I have the following lighttpd.conf
:
server.document-root = "/var/www/root"
server.modules = ( "mod_scgi" )
server.port = 80
server.username = "www"
server.groupname = "www"
mimetype.assign = (
".htm" => "text/html",
".html" => "text/html",
".txt" => "text/plain",
".jpg" => "image/jpeg",
".png" => "image/png",
".myfile" => "text/html",
".zhtml" => "text/html"
)
index-file.names = ( "index.html" )
server.protocol-http11 = "enable"
server.error-handler-404 = "/error-404.php"
scgi.server = (
"/infodesk" => ( "127.0.0.1" => ( "host" => "127.0.0.1", "port" => 9123, "fix-root-scriptname" => "enable", "check-local" => "disable" ) )
)
When requesting http://192.168.0.42/infodesk
I get the correct CGI. But when requesting e.g. http://192.168.0.42/InfoDesk
I get an Error 404.
Is there any way to configure mod_scgi to be case insensitive?
I searched the lighttpd docs and configurations but couldn't find a thing. The source code of mod_scgi is ok to read and understand, but I didn't find a line where the CGI-URI is handlend or compared or so.
Thanks for any hints!
Ok, finally I solved it.
In lighttpd-1.4.33 source
mod_scgi.c
(beginning line 2715):replace the
strncmp()
with astrcasecmp()
and delete paramct_len
.Now the CGI-URI
http://192.168.0.42/infodesk
will be handled the same ashttp://192.168.0.42/InfoDesk
.