Francis Daly
February 22, 2013 07:58AM
On Fri, Feb 22, 2013 at 06:27:27AM -0500, shumisha wrote:

> I am running into a weird issue, after having configured nginx 0.7.67 (comes
> with debian 6) for serving PHP pages, with automatic subdomains.
> It works fine for the most part, but when requesting a url that correspond
> to an actual folder, but without a trailing slash, the subdomain recognition
> fails.

What is probably happening is that when you ask for /dir, you get a http
redirect to /dir/. That redirect must include the full url, including
the hostname. And nginx has to choose which hostname to use. And it
doesn't choose the one that you want it to choose.

What is the output of

curl -i http://subD1.XXXX.net/admin

? I guess it will show http://XXXX.net/admin/. You then separately
request http://XXXX.net/admin/, and therefore shouldn't be surprised
that the subdomain recognition fails, because in this request there is
no subdomain.

Possibly setting server_name_in_redirect
(http://nginx.org/r/server_name_in_redirect) to "off" will work for
you? The docs say that default is off, but I think that may have been
different in the 0.7 series.

f
--
Francis Daly francis@daoine.org

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

Issue with auto subdomain nd trailing slash

shumisha February 22, 2013 06:27AM

Re: Issue with auto subdomain nd trailing slash

Francis Daly February 22, 2013 07:58AM

Re: Issue with auto subdomain nd trailing slash

shumisha February 22, 2013 08:39AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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