Hey guys, I wanted to try out SSL on my server so I decided to create some self-signed SSL certificates as outlined here. After going to the document-root
, firefox did indeed allow me to accept the certificate and stuff. But when I actually tried to access files within the test
directory, it kept throwing 404s. If I switched it to http instead of https, it worked.
I checked the access.log and it showed this:
my.ip server.ip - [05/Jan/2010:01:33:08 +0100] "GET /test/index.html HTTP/1.1" 404 345 "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6"
So it seems like even though I am requesting as https, it is requesting the file as http. My document-root
in lighttpd.conf is /var/www
, but for the ssl section I set it as /var/www/test
, could there be a conflict right there? Should I make them separate directories?
I also tried doing a redirect so that supposedly, http requests to the test directory would be sent as https, but I don't think it's working, maybe I did it wrong.
Here is the relevant information from my lighttpd.conf file, I would appreciate any help you guys can give. Thanks.
$SERVER["socket"] == "some.ip:443" {
server.document-root = "/var/www/test/"
var.basedir = "/var/www/test/"
ssl.engine = "enable"
ssl.pemfile = "/etc/lighttpd/ssl/some.ip/server.pem"
}
$HTTP["scheme"] == "http" {
url.redirect = ("^/(test.*)" => "https://some.ip/$1")
}