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
my server config looks like this
server {
listen 80;
server_name www.domain.com;
try_files $uri $uri/ /index.php?q=$uri&$args;
#error_page 404 /index.php?error=404;
location / {
root /usr/share/nginx/html;
index index.html index.htm index.php;
if (!-e $request_filename) {
rewrite ^ /index.php last;
}
error_page 404 /swf/404.php;
location = /swf/404.php {
root /usr/share/nginx/html;
}
}
I've searched about and found examples of the error_page directive being used not specifically for a 404 but i assumed its the same.
It doesn't seem to work though.
Can anyone help me please?