Fix to show custom error page for unknown domains

This commit is contained in:
Matthew Wild 2021-02-02 12:27:43 +00:00
parent 7621eb0488
commit e61b46cf94
3 changed files with 24 additions and 5 deletions

View File

@ -22,5 +22,12 @@ server {
error_page 404 /_errors/404_site.html;
return 404;
location = /_errors/404_site.html {
root /var/www/html;
internal;
}
location / {
try_files none =404;
}
}

View File

@ -58,5 +58,12 @@ server {
error_page 404 /_errors/404_site.html;
return 404;
location = /_errors/404_site.html {
root /var/www/html;
internal;
}
location / {
try_files none =404;
}
}

View File

@ -20,9 +20,14 @@ server {
listen ${SNIKKET_TWEAK_HTTP_PORT};
listen [::]:${SNIKKET_TWEAK_HTTP_PORT};
root /var/www/html;
error_page 404 /_errors/404_site.html;
return 404;
location = /_errors/404_site.html {
root /var/www/html;
internal;
}
location / {
try_files none =404;
}
}