From 925e4e0b507997c06b2f3ea888bc7b7873feee04 Mon Sep 17 00:00:00 2001 From: Gabriel Ebner Date: Fri, 16 Mar 2018 17:26:58 +0100 Subject: [PATCH] mastus: website: fix 404 cgi --- mastus/website.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/mastus/website.nix b/mastus/website.nix index 949ed25..0508791 100644 --- a/mastus/website.nix +++ b/mastus/website.nix @@ -40,15 +40,17 @@ ssl_stapling_verify on; root /srv/www.gebner.org; - error_page 404 403 /404.cgi; + error_page 404 403 /404.html; access_log logs/website_access.log; - location ~ [^/]\.cgi(/|$) { - fastcgi_split_path_info ^(.+?\.cgi)(/.*)$; - if (!-f $document_root$fastcgi_script_name) { - return 404; - } + location / { + try_files $uri $uri/ @not_found; + } + + location @not_found { + try_files /404.cgi =404; + fastcgi_intercept_errors on; fastcgi_pass unix:${config.services.fcgiwrap.socketAddress}; } }