From 4e1e12758b80850af0727f62c4977ae2cabafc8d Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 30 Apr 2020 23:43:32 +0100 Subject: lighttpd: Fix FastCGI configuration to pass full path as PATH_INFO The configuration file uses an empty path, which I assume means that the HTTP server root should map to the LC webapp root. So we want the full path of the request to be passed as PATH_INFO. However, with this configuration lighttpd actually seems to pass the first path component as SCRIPT_NAME and the rest as PATH_INFO. We need to set the path to "/" and enable the fix-root-scriptname option to get the full path in PATH_INFO. --- etc/lighttpd/lorry-controller-webapp-httpd.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/lighttpd/lorry-controller-webapp-httpd.conf b/etc/lighttpd/lorry-controller-webapp-httpd.conf index 206371e..68f67c5 100644 --- a/etc/lighttpd/lorry-controller-webapp-httpd.conf +++ b/etc/lighttpd/lorry-controller-webapp-httpd.conf @@ -20,13 +20,15 @@ $SERVER["socket"] == "127.0.0.1:12765" { server.username = "lorry" server.groupname = "lorry" fastcgi.server = ( - "" => + "/" => ( "python-fcgi" => ( "socket" => "/run/lighttpd-lorry/lorry-controller-webapp.socket", "bin-path" => "/usr/bin/lorry-controller-webapp --config=/etc/lorry-controller/webapp.conf", "check-local" => "disable", + # Pass full request path as PATH_INFO + "fix-root-scriptname" => "enable", "max-procs" => 1, ) ) -- cgit v1.2.1