diff --git a/mastus/website.nix b/mastus/website.nix index 810f520..949ed25 100644 --- a/mastus/website.nix +++ b/mastus/website.nix @@ -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; + }; }