using a proxied server as default_server

Francis Daly francis at daoine.org
Fri May 31 08:09:05 UTC 2013


On Thu, May 30, 2013 at 10:16:28PM -0400, angelochen960 wrote:

Hi there,

> 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 ?

What does "does not work" mean?

Be specific.

What do you do? (curl -i http://192.168.1.1)
What do you see? (The "wrong" content? An error message? Something else?)
What do you expect to see? (The "right" content?)

You will probably find that it is easier for people to offer help and
suggestions if you make it easy for them to do that.

In this particular case, what is expected to happen? I imagine it is:

browser makes request to nginx;
nginx makes request to tomcat with some specific headers set;
tomcat responds to nginx;
nginx responds to browser

Can you see what actually does happen?

If you can find the first point in "what does happen" that doesn't
match "what should happen", then you'll have a good hint as to where
the problem is.

Good luck,

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list