using a proxied server as default_server
angelochen960
nginx-forum at nginx.us
Fri May 31 02:16:28 UTC 2013
Hi,
I have a tomcat app running behind nginx, it works, now I make it the
default_server, this works if it access with server name like sample.com,
but if access with an IP, http://192.168.1.1, it does not work, any idea ?
Thanks,
server {
listen 192.168.1.1:80 default_server;
server_name sample.com
root /var/www/public_html;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://127.0.0.1:8080;
proxy_redirect off;
}
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,239707,239707#msg-239707
More information about the nginx
mailing list