Nginx causes redirects when server root is changed
francis at daoine.org
Tue Jul 31 17:33:08 UTC 2012
On Tue, Jul 31, 2012 at 03:06:58AM -0400, yashgt wrote:
> My application is installed at
> When I access
> it works fine. This is because the server root is set to
> Now I want to acces the app using http://myserver.co.in:81/index.php.
> When I change the server root to /usr/share/nginx/www/magento/current
> and type the above URL, it REDIRECTS with http 302 to
> What might be the reason for this?
Might it be the application doing the redirect, and not nginx?
What is the output from running the command
curl -i http://myserver.co.in:81/index.php
? Does it include anything like "X-Powered-By: PHP"?
>From your configuration, I see no obvious reason why nginx should be
issuing the redirect.
If it *is* the application, then you'll probably want to configure it
to do what you want it to do.
Good luck with it,
Francis Daly francis at daoine.org
More information about the nginx