Adding 404 pages

This commit is contained in:
Ric Harvey
2016-08-09 12:20:13 +01:00
parent 73ed81e795
commit 453f13a8c3
6 changed files with 6098 additions and 16 deletions

View File

@@ -25,17 +25,24 @@ server {
location / {
# First attempt to serve request as file, then
# as directory, then fall back to index.html
try_files $uri $uri/ /index.php?q=$uri&$args;
try_files $uri $uri/ =404;
}
#error_page 404 /404.html;
error_page 404 /404.html;
location = /404.html {
root /var/www/errors;
internal;
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www/html;
}
location ^~ /ngd-style.css {
alias /var/www/errors/style.css;
access_log off;
}
location ^~ /ngd-sad.svg {
alias /var/www/errors/sad.svg;
access_log off;
}
# pass the PHP scripts to FastCGI server listening on socket
#