/etc/lighttpd/lighttpd.conf
# active modules
server.modules = (
"mod_alias",
"mod_status",
)
# server main settings
server.document-root = "/var/www"
server.username = "www-data"
server.groupname = "www-data"
server.upload-dirs = ( "/tmp" )
server.errorlog = "/var/log/lighttpd/error.log"
server.pid-file = "/var/run/lighttpd.pid"
index-file.names = ( "index.html", "index.sh" )
# where to get status information
status.status-url = "/status"
# where to find the 'real' web pages
alias.url = ( "/data/www/fromusb/" => "/data/" )
alias.url += ( "/data/" => "/data/" )
# allow directory listing
dir-listing.encoding = "utf-8"
server.dir-listing = "enable"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
/etc/lighttpd/conf-enabled/10-cgi.conf
# /usr/share/doc/lighttpd-doc/cgi.txt
server.modules += ( "mod_cgi" )
$HTTP["url"] =~ "^/cgi-bin/" {
cgi.assign = ( "" => "" )
}
## Warning this represents a security risk, as it allow to execute any file
## with a .pl/.py even outside of /usr/lib/cgi-bin.
#
cgi.assign = (
# ".pl" => "/usr/bin/perl",
".sh" => "/bin/dash",
)