Welcome! Log In Create A New Profile

Advanced

Re: Issue with auto subdomain nd trailing slash

February 22, 2013 08:39AM
Hi Francis,

Thanks a lot for your message, I think I got things under control thanks to you!

You're right, there's indeed a 301 thrown by nginx from http://subdomain.xxxx.net/admin to http://xxxx.net/admin/
(as shown by the curl output).

I had tried server_name_in_redirect to off before, to no avail, but I tried again, just in case. I looked up the documentation again, and I realized:

- it's probably not active on my version, as nginx still uses the first server in the server_name directive regardless of the directive value. However, it's a valid config value
- but that got me thinking and I simply switched the orders of server, so that it reads:

server_name *.xxxx.net xxxx.net;

So now the automatic redirect still happens (I think it should be configurabe, maybe it is) but by placing the *.xxxx.net server first in the server_name directive, the sub domain is preserved and the redirect now happens with the correct host.

Thanks again for your help :)

Rgds
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: 104
Record Number of Users: 7 on May 23, 2016
Record Number of Guests: 238 on March 17, 2016
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready