From: Jakub Czajka Date: Sat, 11 May 2024 22:52:15 +0000 (+0200) Subject: Serve /views based on the URI. X-Git-Url: https://git.ekhem.eu.org/?a=commitdiff_plain;h=8823d0be817dc09f8e1f6ddcd16ac2338d3f715c;p=website.git Serve /views based on the URI. --- diff --git a/views.sh b/views.sh index 915493e..dbb2015 100755 --- a/views.sh +++ b/views.sh @@ -4,8 +4,6 @@ . /etc/environment -_querypath="/${FILENAME}" - echo "HTTP/1.1 200 OK" echo "Content-Type: text/html" echo "" @@ -14,4 +12,4 @@ echo "" --no-align --command="\ SELECT COUNT(*) FROM access_logs -WHERE access_log::json->>'path' = '${_querypath}'" +WHERE access_log::json->>'path' = '/${URL}'" diff --git a/website.conf b/website.conf index 393297d..5f471fa 100644 --- a/website.conf +++ b/website.conf @@ -34,7 +34,7 @@ server { include fastcgi_params; fastcgi_pass unix:/var/run/fcgiwrap.socket; - fastcgi_param URL ${dollar}uri; + fastcgi_param URL ${dollar}1; fastcgi_param SCRIPT_FILENAME ${dollar}document_root/views.sh; }