Mercurial > hg > nginx-quic
annotate conf/fastcgi.conf @ 4375:f31146f282fd
Added clearing of r->valid_unparsed_uri on internal redirects.
This resolves issue with try_files (see ticket #70), configuration like
location / { try_files $uri /index.php; }
location /index.php { proxy_pass http://backend; }
caused nginx to use original request uri in a request to a backend.
Historically, not clearing of the r->valid_unparsed_uri on internal redirect
was a feature: it allowed to pass the same request to (another) upstream
server via error_page redirection. Since then named locations appeared
though, and it's time to start resetting r->valid_unparsed_uri on internal
redirects. Configurations still using this feature should be converted
to use named locations instead.
Patch by Lanshun Zhou.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 19 Dec 2011 14:11:48 +0000 |
parents | 5aeaf8490578 |
children | 4e2551a83291 |
rev | line source |
---|---|
537 | 1 |
3383 | 2 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; |
537 | 3 fastcgi_param QUERY_STRING $query_string; |
4 fastcgi_param REQUEST_METHOD $request_method; | |
5 fastcgi_param CONTENT_TYPE $content_type; | |
6 fastcgi_param CONTENT_LENGTH $content_length; | |
7 | |
8 fastcgi_param SCRIPT_NAME $fastcgi_script_name; | |
9 fastcgi_param REQUEST_URI $request_uri; | |
10 fastcgi_param DOCUMENT_URI $document_uri; | |
11 fastcgi_param DOCUMENT_ROOT $document_root; | |
12 fastcgi_param SERVER_PROTOCOL $server_protocol; | |
13 | |
14 fastcgi_param GATEWAY_INTERFACE CGI/1.1; | |
1330 | 15 fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; |
537 | 16 |
17 fastcgi_param REMOTE_ADDR $remote_addr; | |
18 fastcgi_param REMOTE_PORT $remote_port; | |
19 fastcgi_param SERVER_ADDR $server_addr; | |
20 fastcgi_param SERVER_PORT $server_port; | |
21 fastcgi_param SERVER_NAME $server_name; | |
22 | |
23 # PHP only, required if PHP was built with --enable-force-cgi-redirect | |
24 fastcgi_param REDIRECT_STATUS 200; |