Welcome! Log In Create A New Profile

Advanced

Re: using a proxied server as default_server

May 31, 2013 07:30AM
Hi,

Sorry for not making it more specific, the issue is, the app in the tomcat is a virtual host as well, so it checks 'host' field for 'sample.com', a default_server with specific IP when accessed by a IP address like http://192.168.1.1/, it will not have a 'host', thus when passed to the app in the tomcat, it will not hit the right virtual host there, initially I was thinking, probably nginx can insert the 'host' before proxy to tomcat to make it work.

however, do find a simple solution to this problem, in the default.conf, I added:

localtion / { return 302 http://sample.com;}

and remove the default_server from my virtual host for sample.com

this meets my requirement

thanks,

Angelo
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: 102
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready