hi all,
today i put my nginx in production , listening on port 80.
Requestes to www, pass-through proxy directive, will be sended to the
localhost:82, where is the tomcat.
Another site, blog.domain address is apache on the address localhost:81.
I installed the apache’s module rpaf and now I see in the logs IP
addresses of users.
Is there any solution for the tomcat (6.x) to solve the problem too?
Thanks
here my default.conf
server {
server_name www.domain.com;
location / {
port_in_redirect off;
proxy_redirect off;
proxy_pass http://localhost:82;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port 80;
}
}
server {
server_name blog.domain.com;
location / {
port_in_redirect off;
server_name_in_redirect off;
proxy_redirect off;
proxy_pass http://localhost:81;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port 80;
proxy_set_header X-Server-Address $server_addr;
}
}