Welcome! Log In Create A New Profile

Advanced

Re: Nginx causes redirects when server root is changed

Francis Daly
July 31, 2012 01:34PM
On Tue, Jul 31, 2012 at 03:06:58AM -0400, yashgt wrote:

Hi there,

> My application is installed at
> /usr/share/nginx/www/magento/current
>
> When I access
> http://myserver:81/magento/current/index.php
> it works fine. This is because the server root is set to
> /usr/share/nginx/www;
>
> 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
> http://myserver:81/magento/current.
> 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,

f
--
Francis Daly francis@daoine.org

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

Nginx causes redirects when server root is changed

yashgt July 31, 2012 03:06AM

Re: Nginx causes redirects when server root is changed

Francis Daly July 31, 2012 01:34PM

Re: Nginx causes redirects when server root is changed

yashgt August 01, 2012 03:02AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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