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;
}
Subject Author Posted

using a proxied server as default_server

angelochen960 May 30, 2013 10:16PM

Re: using a proxied server as default_server

Francis Daly May 31, 2013 04:10AM

Re: using a proxied server as default_server

angelochen960 May 31, 2013 07:30AM

Re: using a proxied server as default_server

Francis Daly May 31, 2013 09:02AM

Re: using a proxied server as default_server

angelochen960 May 31, 2013 10:06AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 80
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready