Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IP logging in CGI scripts affected by httpd.conf change

Status
Not open for further replies.

digiwalker

Technical User
Joined
Aug 11, 2004
Messages
1
Location
US
I run a bulletin board website that logs the IP address of each person who posts and displays it next to their name in the post.

Recently I asked why webalizer wasn't tracking where hits were coming from (the pie chart at the bottom) and someone helped me by setting the HostnameLookups Off to HostnameLookups On in the httpd.conf file in /etc/httpd/conf

All of the sudden, the IP addresses were not being logged by the script, the REMOTE_HOST variable was no longer being sent by the server (I think its NULL) (or so that is what I was told by the scripts author) so the variable never recieved a value in the script.

I went back into httpd.conf and changed the HostnameLookups to Off again, and now the IP addresses show up.

Is it possible that when this is enabled the "REMOTE_HOST" variable is not being initialized? Or could it have something to do with each virtual hosts indiviual httpd.conf file?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top