I have HTTPS working for a local instance of Lighttpd.
But I'm wanting to redirect:
http://192.168.1.254 -> https://192.168.1.254:123
https://192.168.1.254 -> https://192.168.1.254:123
My config is below.
What I get ATM is https://192.168.1.254/:4430 which shows "This site can’t provide a secure connection" for both HTTP and HTTPS and I'm guess the extra / after 254 is the cause but I can't seem to figure it out.
server.modules += (
"mod_openssl",
"mod_alias"
)
setenv.add-environment = ("fqdn" => "true")
$SERVER["socket"] == ":4430" {
ssl.engine = "enable"
ssl.pemfile = "/etc/lighttpd/ssl/combined.pem"
ssl.honor-cipher-order = "enable"
ssl.cipher-list = "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH"
ssl.use-sslv2 = "disable"
ssl.use-sslv3 = "disable"
}
# Redirect HTTP to HTTPS 4430
$HTTP["scheme"] == "http" {
$HTTP["host"] =~ ".*" {
url.redirect = (".*" => "https://192.168.1.254:4430")
}
}
# Redirect HTTPS to HTTPS 4430
$SERVER["socket"] == ":443" {
$HTTP["host"] =~ ".*" {
url.redirect = (".*" => "https://192.168.1.254:4430")
}
}