Wednesday 15 September 2010

nginx alias redirect with trailing slash using different host name -


I have the following nginx config that is servering some static pages. It sits behind a load balancer and is not listening to the public host name. The problem with the bottom nginx sends back a 301 to add a previous slash, but it sets the location in the interior. Mysite.production / blog / not www.mysite.com/blog/

  server {80 says; Server_name internal.mysite.production location / blog {root / var / www / somewhere /; }}   

Is there any alternative to change this?

You can specify:

  server_name_in_redirect on; See also   

in your NGN config:

No comments:

Post a Comment