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 [email protected] _______________________________________________ nginx mailing list [email protected] http://mailman.nginx.org/mailman/listinfo/nginx
