rewrite server responses
julien at linuxwall.info
Tue Oct 5 15:37:52 MSD 2010
On Tue, 5 Oct 2010 14:55:22 +0400, Maxim Dounin <mdounin at mdounin.ru> wrote:
> As long as you use fastcgi and your fastcgi application
> returns wrong redirect - you should convince it to return correct
> one by providing appropriate fastcgi_param's.
> Changing fastcgi_param SERVER_PORT to 80 should be enough as far
> as I understand your case.
> Rewriting of 'Location' header returned by backend only available
> for proxy (see proxy_redirect directive), where it's not possible
> to control backend's idea about correct server address.
> Maxim Dounin
Got it ! Indeed, it was a FASTCGI environment variable. but not that one.
# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;
And by commenting it out, I don't have this redirect problem anymore.
That makes me think: where can I find detailled information about FASTCGI environment variables and their meanings ? Some, like SERVER_PORT are easy, but what about REMOTE_PORT for example ?
More information about the nginx