Created
September 19, 2019 13:48
-
-
Save ozzi-/7129928bf227546fb4b3b92a22b9e017 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server.modules += ( "mod_proxy" ) | |
server.modules += ( "mod_auth" ) | |
auth.debug = 2 | |
auth.backend = "plain" | |
auth.backend.plain.userfile = "/var/lighttpd/.lighttpdpassword" | |
$HTTP["host"] == "example.localch" { | |
# Redirect HTTP to HTTPS | |
$HTTP["scheme"] == "http" { | |
$HTTP["host"] =~ ".*" { | |
url.redirect = (".*" => "https://%0$0") | |
} | |
} | |
# Basic Auth | |
auth.require = ( "/" => | |
( | |
"method" => "basic", | |
"realm" => "Password protected area", | |
"require" => "user=eps" | |
) | |
) | |
# Document Root | |
setenv.add-environment = ("fqdn" => "true") | |
server.document-root = "/var/www/html/example" | |
# HTTPS Config | |
$SERVER["socket"] == ":443" { | |
ssl.engine = "enable" | |
ssl.pemfile = "/etc/lighttpd/certs/example.pem" | |
ssl.honor-cipher-order = "enable" | |
ssl.cipher-list = "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH" | |
ssl.use-compression = "disable" | |
ssl.use-sslv2 = "disable" | |
ssl.use-sslv3 = "disable" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment