LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-20-2009, 07:26 AM   #1
mahmoud
Member
 
Registered: Apr 2006
Location: UK
Distribution: Mandriva, Debain, Redhat, Fedora, Ubuntu, FreeBSD
Posts: 269

Rep: Reputation: 30
apache Log


Hi
can anyone help me with apache log format
i have a load balancer which acts as a proxy
on the server it logs the client ip address but on the destination server
it doesnt log the orginal ip address and i want it to
i read somewhere that i can use
HTTP_X_FORWARDED_FOR
HTTP_X_FORWARDED_HOST
HTTP_X_FORWARDED_SERVER

but i dont know how to
i tried puting it on both the proxy server and the destination server but
nothing
this is the config as it stands
proxy server
Quote:
LogFormat "%{Host}i %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\" \"%{Accept-Encoding}i\" \"%{X-Forwarded-Server}i\" \"%{X-Forwarded-Host}i\"" vhostlog
destination server
Quote:
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combine
 
Old 01-20-2009, 10:44 AM   #2
mahmoud
Member
 
Registered: Apr 2006
Location: UK
Distribution: Mandriva, Debain, Redhat, Fedora, Ubuntu, FreeBSD
Posts: 269

Original Poster
Rep: Reputation: 30
thanks but i figured it out
i used
<IfModule log_config_module>
LogFormat "%v %{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" X-Forwarded-For
CustomLog /srv/www/xml.travelintelligence.net/logs/xml_sys_log X-Forwarded-For
</IfModule>
 
  


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
Strange results in /var/log/apache/access.log subt13 Linux - Security 2 08-03-2004 02:21 PM
Apache Log rajbaxi Linux - Security 12 03-22-2004 12:28 AM
apache log level alaios Linux - Networking 1 12-08-2003 11:40 AM
More Apache Log Errors! Crashed_Again Linux - General 2 02-27-2003 06:21 AM
Apache Log Crashed_Again Linux - Security 5 02-01-2003 09:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:40 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
Open Source Consulting | Domain Registration