0

I would like to configure my httpd.conf to see the client IP address and some more information. this is what I have:

LogLevel warn

LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded`
CustomLog "logs/access_log" combined env=!forwarded
CustomLog "logs/access_log" proxy env=forwarded
CustomLog /var/log/httpd/access_log combined env=!dontlog

all I can see when I do tail -f /var/log/httpd/access.log is:

combined
combined

all the time. what am I doing wrong?

Thanks! Dotan.

2 Answers 2

1

combined isn't configured as a LogFormat in the configuration that you've provided - so instead of applying a LogFormat to the file, it's taking combined as a literal format string.

You'll need to set a LogFormat for combined for this to work properly.

1

Just install mod_rpaf, change the config file to allow your proxy's IP and you should get the clients' IP on your log files without making any changes to the log format.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .