В /etc/nginx/nginx.conf
server {
listen 80;
server_name serv;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{X-Real-IP}i\" \"${X-Forwarded-For}i\" \"%{Referer}i\" \"%{User-agent}i\"" combined
CustomLog /var/log/apache2/serv/access_log combined
# tail -n1 /var/log/apache2/serv/access_log
93.186.222.15 - - [31/Aug/2011:06:09:46 +0400] "GET /section8/index.php HTTP/1.0" 200 1879 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20100101 Firefox/5.0"