I have a default lighttpd installation with server.document-root
= /var/www/html
/etc/lighttpd/lighttpd.conf
server.modules = (
"mod_indexfile",
"mod_access",
"mod_alias",
"mod_redirect",
)
server.document-root = "/var/www/html"
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
server.errorlog = "/var/log/lighttpd/error.log"
server.pid-file = "/var/run/lighttpd.pid"
server.username = "www-data"
server.groupname = "www-data"
server.port = 80
# strict parsing and normalization of URL for consistency and security
# https://redmine.lighttpd.net/projects/lighttpd/wiki/Server_http-parseoptsDetails
# (might need to explicitly set "url-path-2f-decode" = "disable"
# if a specific application is encoding URLs inside url-path)
server.http-parseopts = (
"header-strict" => "enable",# default
"host-strict" => "enable",# default
"host-normalize" => "enable",# default
"url-normalize-unreserved"=> "enable",# recommended highly
"url-normalize-required" => "enable",# recommended
"url-ctrls-reject" => "enable",# recommended
"url-path-2f-decode" => "enable",# recommended highly (unless breaks app)
#"url-path-2f-reject" => "enable",
"url-path-dotseg-remove" => "enable",# recommended highly (unless breaks app)
#"url-path-dotseg-reject" => "enable",
#"url-query-20-plus" => "enable",# consistency in query string
)
index-file.names = ( "index.php", "index.html" )
url.access-deny = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = ( "application/javascript", "text/css", "text/html", "text/plain" )
# default listening port for IPv6 falls back to the IPv4 port
include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
include_shell "/usr/share/lighttpd/create-mime.conf.pl"
include "/etc/lighttpd/conf-enabled/*.conf"
#server.compat-module-load = "disable"
server.modules += (
"mod_compress",
"mod_dirlisting",
"mod_staticfile",
)
Then I have some other webpages under /var/www/rss
which should be served when I use https://myip/rss
or when I use https://rss.mydomain.dev
. So I introduced this config
/etc/lighttpd/conf-enabled/20-tt-rss.conf
$HTTP["url"] =~ "^/rss/" {
server.document-root = "/var/www/rss"
dir-listing.activate = "disable"
$HTTP["url"] =~ "^/rss/(locale|classes|schema|lock|utils|cache|templates|\.git)/" {
url.access-deny = ( "" )
}
expire.url = (
"/rss/css/" => "access plus 1 days",
"/rss/images/" => "access plus 1 days",
"/rss/js/" => "access plus 1 days",
"/rss/feed-icons/" => "access plus 1 hours"
)
} else $HTTP["host"] == "rss.mydomain.dev" {
server.document-root = "/var/www/rss"
dir-listing.activate = "disable"
$HTTP["url"] =~ "rss.mydomain.com/(locale|classes|schema|lock|utils|cache|templates|\.git)/" {
url.access-deny = ( "" )
}
expire.url = (
"rss.mydomain.dev/css/" => "access plus 1 days",
"rss.mydomain.dev/images/" => "access plus 1 days",
"rss.mydomain.dev/js/" => "access plus 1 days",
"rss.mydomain.dev/feed-icons/" => "access plus 1 hours"
)
}
When using http://myip/rss/
I get a 404
When using http://rss.mydomain.dev
I get the "Placeholder page"
I am clearly missing something but as new user to lighttpd I don't see what.