summaryrefslogtreecommitdiffstats
path: root/abs/extra/shellinabox/shellinaboxd.include
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2018-05-15 21:14:05 (GMT)
committerBritney Fransen <brfransen@gmail.com>2018-05-15 21:14:05 (GMT)
commit6532d70f98f4e00ca3d2bc0da7615558e10f946e (patch)
treeac70fb48ac05980394163f73456f564dc338b188 /abs/extra/shellinabox/shellinaboxd.include
parent9559a17db2c58e08c6b50b8179bf4e0d3d245ef3 (diff)
downloadlinhes_pkgbuild-6532d70f98f4e00ca3d2bc0da7615558e10f946e.zip
linhes_pkgbuild-6532d70f98f4e00ca3d2bc0da7615558e10f946e.tar.gz
linhes_pkgbuild-6532d70f98f4e00ca3d2bc0da7615558e10f946e.tar.bz2
shellinabox: update to 2.20
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 = ( "" => (