Welcome! Log In Create A New Profile

Advanced

Re: displaying standard 404 page, if php file is not found

Nuno Magalhães
July 29, 2009 10:57AM
Here's mine. Don't know about that try-files thing, this one works for
me. Any nonexistent files get my 404 page.

error_page 404 /40x.html;
location = /40x.html {
root /var/www/nginx-default;
}
location ~ \.(php|html)$ {
fastcgi_pass localhost:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/nginx-default$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT /var/www/nginx-default;
fastcgi_intercept_errors on;
include fastcgi_params;
}

You should use absolute paths though...

HTH

--
() ascii-rubanda kampajno - kontraŭ html-a retpoŝto
/\ ascii ribbon campaign - against html e-mail
Subject Author Posted

displaying standard 404 page, if php file is not found

Samuel Vogel July 29, 2009 10:03AM

Re: displaying standard 404 page, if php file is not found

edogawaconan July 29, 2009 10:12AM

Re: displaying standard 404 page, if php file is not found

Samuel Vogel July 29, 2009 10:53AM

Re: displaying standard 404 page, if php file is not found

Igor Sysoev July 29, 2009 11:00AM

Re: displaying standard 404 page, if php file is not found

Samuel Vogel July 29, 2009 11:26AM

Re: displaying standard 404 page, if php file is not found

edogawaconan July 29, 2009 11:39AM

Re: displaying standard 404 page, if php file is not found

Samuel Vogel July 29, 2009 12:12PM

Re: displaying standard 404 page, if php file is not found

edogawaconan July 29, 2009 01:14PM

Re: displaying standard 404 page, if php file is not found

Samuel Vogel July 29, 2009 01:25PM

Re: displaying standard 404 page, if php file is not found

Nuno Magalhães July 29, 2009 01:43PM

Re: displaying standard 404 page, if php file is not found

Piotr Sikora July 29, 2009 12:17PM

Re: displaying standard 404 page, if php file is not found

Samuel Vogel July 29, 2009 12:25PM

Re: displaying standard 404 page, if php file is not found

Igor Sysoev July 29, 2009 01:17PM

Re: displaying standard 404 page, if php file is not found

Samuel Vogel July 29, 2009 02:00PM

Re: displaying standard 404 page, if php file is not found

Nuno Magalhães July 29, 2009 10:57AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 243
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