Reverse Proxy & Log Format

Discussion in 'Installation/Configuration' started by calocen, Jan 9, 2011.

  1. calocen

    calocen New Member HowtoForge Supporter

    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:

    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:
    proxy_set_header   X-Real-IP        $remote_addr;
    A better solution will be appreciated

Share This Page