summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2019-12-04 18:39:04 -0600
committerJohn Klug <john.klug@multitech.com>2019-12-04 18:39:04 -0600
commitb4f1730b5a708cf3b3caf5b593552533b444007f (patch)
treee2a9cbac5ec596913424022f06243af9e93fcb80
parent0ad36d5815601f16a632d3142d449f64293f96ea (diff)
downloadcommissioning-b4f1730b5a708cf3b3caf5b593552533b444007f.tar.gz
commissioning-b4f1730b5a708cf3b3caf5b593552533b444007f.tar.bz2
commissioning-b4f1730b5a708cf3b3caf5b593552533b444007f.zip
Fix redirect from http.
-rw-r--r--etc/lighttpd-commission.conf14
1 files changed, 4 insertions, 10 deletions
diff --git a/etc/lighttpd-commission.conf b/etc/lighttpd-commission.conf
index 38591eb..5317eb5 100644
--- a/etc/lighttpd-commission.conf
+++ b/etc/lighttpd-commission.conf
@@ -136,7 +136,7 @@ static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
######### Options that are good to be but not neccesary to be changed #######
## bind to port (default: 80)
-#server.port = 81
+server.port = 80
## bind to localhost (default: all interfaces)
#server.bind = "grisu.home.kneschke.de"
@@ -234,21 +234,15 @@ fastcgi.server = ( ".php" =>
ssl.engine = "enable"
ssl.pemfile = "/var/config/server.pem"
-$HTTP["scheme"] == "http" {
- # capture vhost name with regex conditiona -> %0 in redirect pattern
- # must be the most inner block to the redirect rule
- $HTTP["host"] =~ ".*" {
- url.redirect = (".*" => "https://%0$0")
- }
-}
-
$SERVER["socket"] == ":443" {
ssl.engine = "enable"
ssl.pemfile = "/var/config/server.pem"
ssl.use-sslv3 = "enable"
ssl.openssl.ssl-conf-cmd = ("Protocol" => "-ALL, -TLSv1, -SSLv3")
server.document-root = "/www/commission"
-}
+} else $HTTP["host"] =~ "^(.+)(:[0-9]+)?$" {
+ url.redirect = ( "^/(.*)$" => "https://%1:443/$1" )
+}
#### status module
#status.status-url = "/server-status"