HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Reverse Proxy & Log Format (http://www.howtoforge.com/forums/showthread.php?t=50863)

calocen 9th January 2011 21:41

Reverse Proxy & Log Format
 
Tip when you install ispconfig 3 behind a reverse proxy like nginx.

In /etc/apache2/sites-available/ispconfig.conf changes '%h' to '%{X-Real-IP}i' to get this:

Code:

LogFormat "%v %{X-Real-IP}i %l %u %t \"%r\" %>s %B \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig
In order to apache logs for awstats works properly.

I've also defined in my /etc/nginx/nginx.conf config file:
Code:

proxy_set_header  X-Real-IP        $remote_addr;
A better solution will be appreciated


All times are GMT +2. The time now is 06:50.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.