summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorBen Hutchings <ben.hutchings@codethink.co.uk>2020-04-30 23:43:32 +0100
committerBen Hutchings <ben.hutchings@codethink.co.uk>2020-06-01 15:26:02 +0100
commit4e1e12758b80850af0727f62c4977ae2cabafc8d (patch)
tree26d3711af3f7051da821973e27b365bd0d85eecd /etc
parent3e7a27fc09ac92db07c404bc88d3f1844faca94c (diff)
downloadlorry-controller-4e1e12758b80850af0727f62c4977ae2cabafc8d.tar.gz
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.
Diffstat (limited to 'etc')
-rw-r--r--etc/lighttpd/lorry-controller-webapp-httpd.conf4
1 files changed, 3 insertions, 1 deletions
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,
)
)