Welcome! Log In Create A New Profile

Advanced

using a proxied server as default_server

May 30, 2013 10:16PM
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;
}
SubjectAuthorPosted

using a proxied server as default_server

angelochen960May 30, 2013 10:16PM

Re: using a proxied server as default_server

Francis DalyMay 31, 2013 04:10AM

Re: using a proxied server as default_server

angelochen960May 31, 2013 07:30AM

Re: using a proxied server as default_server

Francis DalyMay 31, 2013 09:02AM

Re: using a proxied server as default_server

angelochen960May 31, 2013 10:06AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 52
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 229 on August 01, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready