LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-05-2012, 02:12 AM   #1
piyushsingh
LQ Newbie
 
Registered: Sep 2012
Posts: 21

Rep: Reputation: Disabled
Command to see all ip's that accessing my public Apache server


i have made A public Apache Server in rhel 6..i want to know the command by which i can see how many ip's (externel) is accessing my Apache server.

is there any command by which i can see all the requests on my Apache server..

please help me...
 
Old 10-05-2012, 03:03 AM   #2
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558
Blog Entries: 5

Rep: Reputation: Disabled
Hi

Grep your Apache access log using C--Count flag

Example
192.168.1.1 - - 05/Oct/2012:16:11:09 +0530 "GET /../../../images/wanna-img.jpg HTTP/1.1" 400 306 "-" "facebookexternalhit/1.0 (+http://www.facebook.com/)"

# grep -c "05/Oct/2012" /var/log/httpd/log/access.log - you specify the date you can find out the number of hits received per days


# grep -c "192.168.1.1" /var/log/httpd/log/access.log -You can find out the number of hits received by specific ipaddress


#cat /var/log/httpd/access_log | cut -d" " -f1 | sort -n | uniq | wc -l

Last edited by jsaravana87; 10-05-2012 at 03:06 AM.
 
Old 10-05-2012, 03:16 AM   #3
piyushsingh
LQ Newbie
 
Registered: Sep 2012
Posts: 21

Original Poster
Rep: Reputation: Disabled
Thanks sir
be more specific..
give me command to see all requests of externel ip's that are coming on pubic Apache server..
 
Old 10-05-2012, 03:48 AM   #4
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,380

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
#cat /var/log/httpd/access_log
 
Old 10-05-2012, 04:40 AM   #5
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
Quote:
Originally Posted by piyushsingh View Post
Thanks sir
be more specific..
give me command to see all requests of externel ip's that are coming on pubic Apache server..
Have you tried any of the suggested commands? Have you tried to understand them and adjust to your needs?

Last edited by Wim Sturkenboom; 10-05-2012 at 04:41 AM.
 
Old 10-05-2012, 04:48 AM   #6
piyushsingh
LQ Newbie
 
Registered: Sep 2012
Posts: 21

Original Poster
Rep: Reputation: Disabled
yah dude...First one...using flag --C
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems accessing Apache server On Suse 10.3 Linux, behind a Lynksys WRT54GS router mrukjames Linux - Server 1 10-04-2008 03:49 PM
Accessing Apache server from internet wisdom Linux - Networking 3 12-22-2004 12:05 PM
Problem accessing subdirs from doc root on Apache server ph0ngwh0ng Linux - Newbie 4 04-24-2004 01:02 PM
Problems accessing my RH9 Apache web server from the URL! kman2045 Linux - Networking 7 01-10-2004 09:14 AM
Accessing a local server with a public IP ganninu Linux - Networking 5 12-29-2003 05:07 AM


All times are GMT -5. The time now is 02:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration