nginx-1.1.12
Boyko Yordanov
b.yordanov at exsisto.com
Tue Dec 27 19:29:38 UTC 2011
Hi,
The quick fix did the trick.
Maybe best if changelog entries contain info whether new features/bugfixes require updating current nginx configuration to preserve nginx behavior with newer version or similar?
Having in mind I'm using relatively common nginx configuration/apache backend, once these changes are applied to the stable release they will probably affect many others?
Many thanks!
Boyko
On Dec 27, 2011, at 7:11 PM, Maxim Dounin wrote:
> Hello!
>
> On Tue, Dec 27, 2011 at 06:09:50PM +0200, Boyko Yordanov wrote:
>
>> nginx 1.1.12 behaves differently compared to nginx 1.1.11 on my
>> setup which I'll try to explain below.
>
> [...]
>
>> While my configs may not be optimized or may even be wrong, they
>> were interpreted differently by every nginx version other than
>> 1.1.12. Not sure if this is something I have to fix by changing
>> my configs?
>
> (cc'd back to list)
>
> Ok, so basically your config (simplified) is as follows:
>
> location / {
> index index.php;
> }
>
> location ~ \.php$ {
> proxy_pass http://backend;
> }
>
> With 1.1.12 proxy_pass without URI component always uses modified
> URI after internal redirects, and as a result "/index.php" request
> is passed to upstream instead of "/" previously (as index module
> does an internal redirection, see [1]).
>
> Apparently your backend doesn't like this and returns 302 in an
> attempt to normalize the URI.
>
> Quick fix is to use something like
>
> location ~ \.php$ {
> proxy_pass http://backend$request_uri;
> }
>
> to ensure original request uri is passed to upstream.
> Alternatively, you may use something like
>
> location ~ (\.php|/)$ {
> proxy_pass http://backend;
> }
>
> [1] http://www.nginx.org/en/docs/http/request_processing.html#simple_php_site_configuration
>
> Maxim Dounin
>
More information about the nginx
mailing list