FastCGI access path
Added by worik over 5 years ago
I have FastCGI working for "https://example.com/"
I would like to be able to use: "https://example.com/foo" and have my cgi script called with the "REQUEST_URI" parameter set to "/foo"
I am using:
fastcgi.server = (
"/" =>
( "API" =>
(
"socket" => "/var/run/lighttpd/cgi.socket",
"bin-path" => "/path_to_fastcgi_server"
)
)
)
I have tried:
fastcgi.server = (
"/*" =>
( "API" =>
(
"socket" => "/var/run/lighttpd/cgi.socket",
"bin-path" => "/path_to_fastcgi_server"
)
)
)
But that did not work
cat /etc/issue
Ubuntu 19.04
lighttpd -v
lighttpd/1.4.53 (ssl) - a light and fast webserver
Replies (5)
RE: FastCGI access path - Added by gstrauss over 5 years ago
Hints:
Have you tried looking at the entire contents of the FastCGI environment?
Have you read the docs on mod_fastcgi?
Have you looked the the RFCs for CGI (https://tools.ietf.org/html/rfc3875) and FastCGI (https://fast-cgi.github.io/spec)? Which env vars are defined?
RE: FastCGI access path - Added by gstrauss over 5 years ago
That is a bit irrelevant
Moreso to those ignorant of the Common Gateway Interface (CGI) environment conventions. REQUEST_URI is not part of the CGI or FastCGI specs.
RE: FastCGI access path - Added by worik over 5 years ago
The question is how do I get the paths to match.
"RequestURI" is a red herring.
The way that Lighttpd calls scripts is what I care about.