error directive help with 404

Maxim Dounin mdounin at mdounin.ru
Mon May 31 01:56:46 MSD 2010


Hello!

On Fri, May 28, 2010 at 06:23:13PM -0400, robinsonc494 wrote:

> Hi all,
> I've just moved from an apache2 server and i'm trying to set up nginx.
> 
> Its installed, compiled from source and running fine.
> In the process of fine tuning my setup i noticed  my 404's aren't doing what i want.
> 
> I have my wordpress blog setup with php-fpm for php
> 
> when a 404 happens on a file with .html or /no-existent-url
> the 404 does what i expect and wordpress handles it with my custom page.
> 
> if i enter domain.com/somepage.php i get the nasty default page that browsers server.
> in I.E especially 

So you have 404 returned from php, and it's returned to browser as 
is.  Use fastcgi_intercept_errors to intercept backend errors, see 
here:

http://wiki.nginx.org/NginxHttpFcgiModule#fastcgi_intercept_errors

Maxim Dounin



More information about the nginx mailing list