March 26, 2009 04:13AM
2009/3/26 Igor Sysoev <is@rambler-co.ru>:

> Besides "fastcgi_intercept_errors on" you also need
>
>     error_page  404  /404.html;
>
> nginx does not intercept an error if there is no custom handler for it:
> it does not show its default pages. This allows to intercept some errors,
> while passing others as are.

This would be good to document. I will try to remember to add it to the wiki.

>                 location ~ ^/files/(.*) {
>                         fastcgi_pass 127.0.0.1:11021;
>                         fastcgi_param  SCRIPT_FILENAME /path/to/foo.php;
>                         fastcgi_param  QUERY_STRING    file=$1;
>                 }

Is there any performance benefit here? Rewrite seems simple. Any I
would like to use try_files for any possible situation that it is
suitable for now ;)
Subject Author Posted

Shouldn't this trigger an nginx 404?

mike March 24, 2009 08:36PM

Re: Shouldn't this trigger an nginx 404?

Igor Sysoev March 25, 2009 11:35AM

Re: Shouldn't this trigger an nginx 404?

mike March 26, 2009 12:29AM

Re: Shouldn't this trigger an nginx 404?

Igor Sysoev March 26, 2009 03:25AM

Re: Shouldn't this trigger an nginx 404?

mike March 26, 2009 04:13AM

Re: Shouldn't this trigger an nginx 404?

Igor Sysoev March 26, 2009 05:17AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 317
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready