Adding 404 pages
This commit is contained in:
@@ -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
|
||||
#
|
||||
|
||||
@@ -19,17 +19,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
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user