try_files... don't think I'm doing it right.

Phillip B Oldham phill at theactivitypeople.co.uk
Fri Mar 20 12:06:11 MSK 2009


Igor Sysoev wrote:
> The try_files test files existance and fallback to last parameter.
> As there is no @zine file it always goes to @fallback.
> You config should be
>
> server {
>       listen 80;
>       server_name mysite.com;
>
>       error_page 500 502 503 504  /maintenance.html;
>
>       location / {
>                include conf/fastcgi_params;
>                fastcgi_param PATH_INFO $fastcgi_script_name;
>                fastcgi_param SCRIPT_NAME "";
>                fastcgi_pass unix:/tmp/mysite.socket;
>
>                fastcgi_intercept_errors  on;
>       }
>
>       location = /maintenance.html {
>               root /var/www/mysite;
>       }
> }
>   
Ah ha! Didn't spot the fastcgi_intercept_errors in the config docs when 
I first tried a similar config. Is there a reason why its not "on" by 
default?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: phill.vcf
Type: text/x-vcard
Size: 261 bytes
Desc: not available
URL: <http://nginx.org/pipermail/nginx/attachments/20090320/9946bc5c/attachment.vcf>


More information about the nginx mailing list