Project

General

Profile

[UE] adding index.cgi to index-file.names not working

Added by jello almost 4 years ago

Hello again,

I'm trying to create a configuration for a perl CGI program. It lives in /usr/share/collection3/ and consists of a few perl scripts that have a .cgi file extension, and some static files (eg. stylesheets, javascript, images, etc...). I've created the following config snippet:

server.modules += ( "mod_cgi", "mod_alias", "mod_indexfile" )

$HTTP["url"] =~ "^/collection3/" {
    #server.breakagelog = "/var/log/lighttpd/collection3.log" 
    alias.url += ( "/collection3/" => "/usr/share/collection3/" )
    cgi.execute-x-only = "enable" 
    cgi.assign = ( ".cgi" => "/usr/bin/perl" )
    index-file.names += ( "index.cgi" )
}

This seems to mostly work, but if I navigate to https://server.example.org/collection3/, it is giving me an HTTP 403, rather than executing index.cgi. If I go specifically to https://server.example.org/collection3/index.cgi, then it works.

Any ideas?


Replies (3)

RE: adding index.cgi to index-file.names not working - Added by gstrauss almost 4 years ago

module ordering matters

By default, lighttpd adds mod_indexfile to the beginning of the modules list, if mod_indexfile is not listed in lighttpd.conf.

RE: adding index.cgi to index-file.names not working - Added by gstrauss almost 4 years ago

Please do not provide config snippets. If you knew what to include in your snippet and knew what to exclude, then you would know how to fix your issue. Since you do not know how to fix your issue, you are ill-prepared to provide a config snippet. Please provide your complete config when asking "what am I doing incorrectly in my config?".

lighttpd -f /etc/lighttpd.conf -p

RE: adding index.cgi to index-file.names not working - Added by jello almost 4 years ago

Okay, I've attached the complete config here. Of course, I just tested it again and it's working... I must have forgotten to reload lighttpd after I made my last change. Sorry for the noise.

    (1-3/3)