Edit lighttpd config
nano /etc/lighttpd/lighttpd.conf
compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = ( "application/javascript", "text/css", "text/html", "text/plain" )
.
# [add after the syntax above]
.
# Redirect HTTP to HTTPS
$HTTP["scheme"] == "http" {
$HTTP["host"] =~ ".*" {
url.redirect = (".*" => "https://%0$0")
}
}
Restart lighttpd Service
1 | service lighttpd restart |
You must log in to post a comment.