Support custom 404 page
The actual 404 will be generated from pelican. log_not_found was set for privacy reasons (since we don't have a favicon, every request still gets logged with it's full IP due to the 404)
This commit is contained in:
parent
cb4c29f1d7
commit
681da3fd18
1 changed files with 4 additions and 0 deletions
|
@ -41,6 +41,10 @@ in {
|
||||||
serverAliases = [ "www.${baseDomain}" ];
|
serverAliases = [ "www.${baseDomain}" ];
|
||||||
root = webroot;
|
root = webroot;
|
||||||
locations = {
|
locations = {
|
||||||
|
"/".extraConfig = ''
|
||||||
|
log_not_found off;
|
||||||
|
error_page 404 /404.html;
|
||||||
|
'';
|
||||||
"~* ^(/images/.+)\\.(png|jpe?g)$".extraConfig = ''
|
"~* ^(/images/.+)\\.(png|jpe?g)$".extraConfig = ''
|
||||||
set $base $1;
|
set $base $1;
|
||||||
add_header Vary Accept;
|
add_header Vary Accept;
|
||||||
|
|
Loading…
Reference in a new issue