Having a site setup using lighttpd, it's first url was:
http://localhost/vichan/recent.html
I then wanted to put it on a different port to then tunnel it later and shorten the url to make it looks more pretty by putting this in my lighttpd.conf
:
$SERVER["socket"] == ":4447" {
server.document-root = "/var/www/html/vichan/"
index-files.names = ("recent.html")
}
noticed that .css
and .js
werent able to be found, due to the config turning localhost:4447/vichan/style.css
to localhost:4447/vichan/vichan/style.css
, I added a new statement to the rule to compensate for it:
$SERVER["socket"] == ":4447" {
server.document-root = "/var/www/html/vichan/"
index-files.names = ("recent.html")
$HTTP["url"] =~ "^/vichan/"{
server.document-root = "/var/www/html/"
}
}
but then when I tried to make a request to a .php
file, it returned me with Your browser sent an invalid or no HTTP referer.
And I couldn't understand how or why it happens, is there anything that's missing?