Welcome! Log In Create A New Profile

Advanced

Re: how to configure multiple virtual server on nginx?

July 27, 2011 06:14AM
On Wed, Jul 27, 2011 at 06:03:59AM -0400, debugger87 wrote:
> Igor Sysoev Wrote:
> -------------------------------------------------------
> > On Wed, Jul 27, 2011 at 04:58:14AM -0400,
> > debugger87 wrote:
> > > Thank you,Maxim Dounin.
> > > I also think that the problem is outside of
> > nginx.But I'm confused why
> > > IP-1 and IP-2 work,IP-3 don't.
> > > On my computer,IP-1:8080,IP-2:8080,IP-3:8080 and
> > IP-4:8080 are LISTENED
> > > by tomcat application server.
> > > I can access my tomcat by the whole IP
> > address.It looks like a
> > > contradiction that I can access tomcat via
> > IP-3:8080,
> > > and I can not access nginx via IP-3:80.It's very
> > terrible!
> >
> > Probably you need to add tomcat server name in
> > Host header:
> >
> > location / {
> > proxy_pass http://my_upstream;
> > proxy_set_header Host
> > TOMCAT.DOMAIN.NAME;
> > }
> >
> > Since by default nginx sends "Host: my_upstream".
> >
> >
> > --
> > Igor Sysoev
> >
> > _______________________________________________
> > nginx mailing list
> > nginx@nginx.org
> > http://mailman.nginx.org/mailman/listinfo/nginx
>
> Thanks,Igor.
> I have changed the configuration file nginx.conf as what you say.
> Things go athwart,the 3rd server doesn't work as before.
> To describe my problem more definetely,I will give more information as
> following.
> IP-1:80 <=====> 1st server IP-1:8080 <=========>tomcat both work
> right
> IP-2:80 <=====> 2nd server IP-2:8080 <=========>tomcat both work
> right
> IP-3:80 <=====> 3rd server IP-3:8080 <=========>tomcat I can
> access tomcat by IP-3:8080,but can not access nginx by IP-3:80.
>
> Then,I try another configuration
> IP-1:80 <=====> 1st server IP-1:8080 <=========>tomcat both work
> right
> IP-3:80 <=====> 2nd server IP-2:8080 <=========>tomcat I can
> access tomcat by IP-2:8080,but can not access nginx by IP-3:80.
> IP-2:80 <=====> 3rd server IP-3:8080 <=========>tomcat both work
> right
>
> In my eyes,my nginx configuration is correct.But the IP address IP-3
> looks like very special.It can work for tomcat,but nginx not.
> Have you ever met that strange problem?I'm struglling to sovle that
> problem.
> It's pleasure to wait for your reply.
> Thanks!

In this case only debug log may help:
http://nginx.org/en/docs/debugging_log.html


--
Igor Sysoev

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

how to configure multiple virtual server on nginx?

debugger87 July 26, 2011 10:06PM

Re: how to configure multiple virtual server on nginx?

debugger87 July 26, 2011 10:21PM

Re: how to configure multiple virtual server on nginx?

debugger87 July 26, 2011 10:23PM

Re: how to configure multiple virtual server on nginx?

Maxim Dounin July 27, 2011 03:22AM

Re: how to configure multiple virtual server on nginx?

debugger87 July 27, 2011 04:58AM

Re: how to configure multiple virtual server on nginx?

Igor Sysoev July 27, 2011 05:04AM

Re: how to configure multiple virtual server on nginx?

debugger87 July 27, 2011 06:03AM

Re: how to configure multiple virtual server on nginx?

Igor Sysoev July 27, 2011 06:14AM

Re: how to configure multiple virtual server on nginx?

Maxim Dounin July 27, 2011 06:28AM

Re: how to configure multiple virtual server on nginx?

debugger87 July 27, 2011 09:27PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 280
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