You are not logged in.
Hi everyone,
I'm currently using lighttpd to supply myself with basic webserver capability (currently only a PHP info page and transmission web UI). I read a lot of good stuff about nginx, but am failing to find the necessary bits and pieces to throw together a configuration file that mirrors my lighttpd setup. There always seems to be a caveat in some part or another.
Here's my lighttpd.conf file:
server.port = 443
server.username = "http"
server.groupname = "http"
server.document-root = "/srv/http"
server.errorlog = "/var/log/lighttpd/error.log"
dir-listing.activate = "disable"
index-file.names = ("index.php", "index.html")
# mime types
include "conf.d/mimetypes.conf"
# SSL settings
ssl.engine = "enable"
ssl.pemfile = "/etc/lighttpd/certs/key.pem"
# FastCGI for PHP, etc...
include "conf.d/fastcgi.conf"
# Force HTTPS
server.modules += ("mod_redirect")
$HTTP["scheme"] == "http" {
$HTTP["host"] =~ ".*" {
url.redirect = (".*" => "https://%0$0")
}
}
$SERVER["socket"] == ":80" {
$HTTP["host"] =~ ".*" {
url.redirect = ( "^/(.*)$" => "https://%0$0" )
}
}
# Transmission
server.modules += ( "mod_proxy" )
$HTTP["url"] =~ "^/transmission/web/" {
expire.url = ( "" => "access 1 hours" )
} else $HTTP["url"] =~ "^/transmission/(rpc|upload)" {
proxy.server = ( "" => ( ( "host" => "127.0.0.1", "port" => 9091 ) ) )
}
Which is simple, perfect (as far as usability, don't know how pedantically correct this is...), and works. The mimetypes and php configuration are irrelevant. What interests me is the SSL and transmission part. I can't seem to get that right, and surprisingly, the Arch Wiki is lacking any useful information.
Thanks for any help!
Offline