Apache logs not showing source IP

Taking care of your Linux box.
Post Reply
waqaskhawaja
Lance Naik
Posts: 44
Joined: Thu Aug 31, 2006 8:52 pm
Location: Lahore Pakistan
Contact:

Apache logs not showing source IP

Post by waqaskhawaja »

Extract from httpd.conf

Code: Select all

# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog logs/error_log

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

# "combinedio" includes actual counts of actual bytes received (%I) and sent (%O); this
# requires the mod_logio module to be loaded.
#LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
Apache version

Code: Select all

httpd-2.0.54-10.4
Distribution

Code: Select all

Fedora Core release 4 
access_log

Code: Select all

0.0.0.0 - - [09/Jul/2008:06:13:26 +0100] "GET /forums/index.php HTTP/1.0" 404 296 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0"
0.0.0.0 - - [09/Jul/2008:06:13:26 +0100] "GET /favicon.ico HTTP/1.0" 404 291 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0"
I have checked all the log files and source IP is not shown. Is it due to the log level warn or something else?
syedbilalmasaud
Naib Subedar
Posts: 347
Joined: Thu Aug 18, 2005 9:25 am
Location: Attock
Contact:

Post by syedbilalmasaud »

change log level to info


it will work
Cheers :)

:D B I L A L :D
waqaskhawaja
Lance Naik
Posts: 44
Joined: Thu Aug 31, 2006 8:52 pm
Location: Lahore Pakistan
Contact:

Post by waqaskhawaja »

I have changed log level to info but the source IP is still missing.
Last edited by waqaskhawaja on Thu Jul 31, 2008 12:58 pm, edited 1 time in total.
syedbilalmasaud
Naib Subedar
Posts: 347
Joined: Thu Aug 18, 2005 9:25 am
Location: Attock
Contact:

Post by syedbilalmasaud »

did you tried all levels of log
Cheers :)

:D B I L A L :D
lambda
Major General
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Location: Lahore
Contact:

Post by lambda »

log levels are not the problem. they never were.

look, if you don't know the solution, don't post useless suggestions. you waste everyone's time -- the original poster's (who has to take the time to test your post), and everyone else's (who assume your solution works).

i mean, did you confirm that you get 0.0.0.0 with loglevel warn before asking waqas to switch to loglevel info? if not, why did you waste his time?
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
syedbilalmasaud
Naib Subedar
Posts: 347
Joined: Thu Aug 18, 2005 9:25 am
Location: Attock
Contact:

Post by syedbilalmasaud »

log level really works , i have tested it with my system , it will efect the system logging and 2nd thiong i forget to mention which is log format

LogFormat "%h %l %u %t \"%r\" %<s %b" common

so if you feel that reading some body post is waist of time than why you are arguing everybody post , i think its your hobby and if i look your all posts lot of them are insulting some body or so please always look in to your post and as if remeber when i posted job for linux sales guy and you have start making fun of that linux sales guys are not available in pakistan market so how many you want i give you .

at the end of story it is your built-in feature , you are like that
Cheers :)

:D B I L A L :D
LinuxFreaK
Site Admin
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
Location: Karachi
Contact:

Re:

Post by LinuxFreaK »

Dear waqaskhawaja,
Salam,

Code: Select all

CustomLog logs/access_log common
This should help you out.

Best Regards.
Farrukh Ahmed
lambda
Major General
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Location: Lahore
Contact:

Post by lambda »

log level really works , i have tested it with my system , it will efect the system logging
apache's documentation says:
LogLevel adjusts the verbosity of the messages recorded in the error logs (see ErrorLog directive).
so yeah, it works -- for the error logs. not for the access logs.

waqas has tested your suggestion. it didn't work. i've tried it. it didn't work. i don't believe you when you say changing the loglevel helps at all with solving waqas's problem. really, your ignorance was obvious when you wrote
did you tried all levels of log
and 2nd thiong i forget to mention which is log format
and what a coincidence! your suggested log format is no different from the format he's already using (compare your logformat with his). congratulations on posting yet another useless suggestion!
so if you feel that reading some body post is waist of time than why you are arguing everybody post
to let them and everyone know that they're not a reliable source of solutions. to shame them into improve themselves. please understand that this isn't the first time you've posted stuff that doesn't work. you've been doing it for years.
as if remeber when i posted job for linux sales guy and you have start making fun of that linux sales guys are not available in pakistan market so how many you want i give you.
i remember that post, and discussion. and you know what? i didn't make fun of it. i have the first page saved here. you, like your cohorts linux_linux and shell_lahore, simply couldn't understand the fact that someone else (wacky) criticized your post, not me. now everyone can see the evidence again.

so, back to waqas's problem. what's the solution?
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
Post Reply