#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 = ( "" => ( ("host" => "127.0.0.1", "port" => 4200) )) }