NGINX stops redirecting

Francis Daly francis at daoine.org
Tue May 9 22:17:53 UTC 2017


On Mon, May 08, 2017 at 03:17:53PM -0700, Douglas Landau wrote:

Hi there,

> I don't get it.  On Friday, at 13:39, I was happily browsing my XWiki site, as you can see from the NGINX access_log.  Then from that log you see no activity until 10:31 this morning, at which time it no longer wants to redirect hits to port 8080 or to /xwiki, it just wants to serve from its own html/ subdir.
> 

On Friday, your client was accessing things below
http://dwswiki10.westmarine.net/

On Monday, your client was accessing things below http://dwswiki10/

They are different requests.

Your config snippets show that those two requests are handled in different
server{} blocks.

Because dwswiki10 is not explicit anywhere, it will be handled in the
first server{} here:

> [root at dwswiki10 conf]# more nginx.conf

> http {
>     server {
>         listen       80;
>         server_name  localhost;
>         location / {
>             root   html;
>             index  index.html index.htm;
>         }
> 
>     }
> include ../conf.d/*.conf;
> }

while you probably want it to be handled in this server{}

> [root at dwswiki10 nginx]# cat conf.d/tomcat.conf
> server {
>     listen       80;
>     server_name  dwswiki10.westmarine.net;

Either add "default_server" to the "listen" line, or add "dwswiki10"
to the "server_name" line. Or add a new server{} which redirects from
dwswiki10 to dwswiki10.westmarine.net.

Good luck with it,

	f
-- 
Francis Daly        francis at daoine.org


More information about the nginx mailing list