index or try_files in reverse proxy

meto nginx-forum at nginx.us
Thu Aug 13 14:15:08 MSD 2009


Igor, unfortunately, your config doesn't work as expected. I'm using this config right now and it works for me:

location / {
                index index.html index.htm index.php;

                try_files $uri $uri/ @proxy_backend;
                }

                location ~ ^(.+\.php)(.*)$ {
                try_files $uri @proxy_backend;

                fastcgi_pass    php;

                fastcgi_index  index.php;
                fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
                fastcgi_intercept_errors on;
                fastcgi_buffers 100 32k;
                fastcgi_read_timeout 600;

                include fastcgi_params;
                }


Posted at Nginx Forum: http://forum.nginx.org/read.php?2,4893,4915#msg-4915






More information about the nginx mailing list