mastus: website: enable 404 cgi script

This commit is contained in:
Gabriel Ebner 2018-03-16 17:02:42 +01:00
parent 3c95036437
commit 71a3e19c65
1 changed files with 13 additions and 1 deletions

View File

@ -40,9 +40,21 @@
ssl_stapling_verify on;
root /srv/www.gebner.org;
error_page 404 403 /404.html;
error_page 404 403 /404.cgi;
access_log logs/website_access.log;
location ~ [^/]\.cgi(/|$) {
fastcgi_split_path_info ^(.+?\.cgi)(/.*)$;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
fastcgi_pass unix:${config.services.fcgiwrap.socketAddress};
}
}
'';
services.fcgiwrap = {
enable = true;
};
}