Understanding a lighttpd.conf file?
Posted
by AP257
on Stack Overflow
See other posts from Stack Overflow
or by AP257
Published on 2010-06-08T11:22:38Z
Indexed on
2010/06/08
11:42 UTC
Read the original article
Hit count: 148
Hi all, I've been given a lighttpd.conf that someone else wrote and need help working out how to serve it. I'm 90% of the way there but stuck... The index.html page appears, but links and CSS files don't point to the right place.
To clarify, the links and CSS files are all pointing to a 'file:///' URL. So styles.css
in the HTML header points to file:///html/styles.css
, whereas it should be going to http://url.com/styles.css
Maybe url.rewrite or url.redirect isn't working properly?
server.document-root = "~/html"
server.port = 28001
mimetype.assign = (
".html" => "text/html",
".txt" => "text/plain",
".jpg" => "image/jpeg",
".png" => "image/png"
)
url.rewrite = (
"^(.*)/($|\?.*)" => "$1/index.html",
"^(.*)/([^.?]+)($|\?.*)$" => "$1/$2.html"
)
$HTTP["scheme"] == "http" {
url.redirect = (
"^/platform/index.html$" => "/platform",
"^/about/company.html$" => "/about/company",,
)
}
© Stack Overflow or respective owner