Welcome! Log In Create A New Profile

Advanced

nginx reverse proxy odd 301 redirect

October 05, 2013 06:16PM
Hi,

I have latest nginx which I am using as a reverse proxy for an application of mine running on apache on another server. The nginx config is like this:
upstream upstreamname {
server ip:port;
}

....

location / {
proxy_pass http://upstreamname;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

...

So my problem appears with a certain change password script new users must use when they login first time after their username was created.

If I use apache directly then the change password script works fine. If I do it using nginx as reverse proxy then at the point where I press the submit button and the POST should happen, I can't see the POST hitting the apache backend(no entry in access log) but I can see an odd 301 redirect with the POST request to the script in the nginx access log.

Any idea of what could be the cause? Anything I am doing wrong?

Please help
Thanks
SubjectAuthorPosted

nginx reverse proxy odd 301 redirect

izghituOctober 05, 2013 06:16PM

Re: nginx reverse proxy odd 301 redirect

Maxim DouninOctober 06, 2013 05:34AM

Re: nginx reverse proxy odd 301 redirect

izghituOctober 06, 2013 06:04PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 30
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 156 on March 20, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready