summaryrefslogtreecommitdiffstats
path: root/abs/extra/shellinabox/shellinaboxd.include
diff options
context:
space:
mode:
Diffstat (limited to 'abs/extra/shellinabox/shellinaboxd.include')
-rw-r--r--abs/extra/shellinabox/shellinaboxd.include13
1 files changed, 13 insertions, 0 deletions
diff --git a/abs/extra/shellinabox/shellinaboxd.include b/abs/extra/shellinabox/shellinaboxd.include
index 8d2befa..405a323 100644
--- a/abs/extra/shellinabox/shellinaboxd.include
+++ b/abs/extra/shellinabox/shellinaboxd.include
@@ -1,3 +1,16 @@
+#redirect http to https for /shell
+server.modules += ( "mod_redirect" )
+
+$HTTP["url"] =~ "^/shell" {
+ $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")
+ }
+ }
+}
+
#proxy for shellinaboxd
$HTTP["url"] =~ "/shell/" {
proxy.server = ( "" => (