how to get proxy redirection working?
Added by John Young almost 10 years ago
I am trying to use lighttpd has an HTTPS front-end for an app.
The app can be access using http://my-ip-here:2221 or http://my-ip-here:2221/myapp. The app already has a built-in facility for HTTPS but I want lighttpd to handle all HTTPS requests.
This is my configuration which I based on another app that has working HTTPS redirection. The difference though is that this other app has no built-in HTTPS feature hence the need to use lighttpd.
$SERVER["socket"] == ":2222" { ssl.engine = "enable" ssl.pemfile = "/usr/local/etc/lighttpd/lighttpd.pem" $HTTP["url"] =~ "^/myapp*" { auth.require = ( "" => ( "method" => "digest", "realm" => "MyAppWebInterface", "require" => "valid-user" ) ) proxy.debug = 1 proxy.server = ( "" => ( ( "host" => "127.0.0.1", "port" => 2221 ) ) ) } }
This is the response I get (from error.log)
2015-06-29 11:18:31: (http_auth.c.1018) username myapp 2015-06-29 11:18:31: (http_auth.c.1019) realm MyAppWebInterface 2015-06-29 11:18:31: (http_auth.c.1020) nonce de08d53a372b8f699932c32d06e2f458 2015-06-29 11:18:31: (http_auth.c.1021) uri /myapp 2015-06-29 11:18:31: (http_auth.c.1022) algorithm 2015-06-29 11:18:31: (http_auth.c.1023) qop auth 2015-06-29 11:18:31: (http_auth.c.1024) cnonce 541256410f1eee5a2c013baa0714737a 2015-06-29 11:18:31: (http_auth.c.1025) nc 00000002 2015-06-29 11:18:31: (http_auth.c.1026) response 5233ec9e2ce9893073434f44fdd4fd1d 2015-06-29 11:18:31: (http_auth.c.1185) digest: auth ok 2015-06-29 11:18:31: (mod_proxy.c.1144) proxy - start 2015-06-29 11:18:31: (mod_proxy.c.1185) proxy - ext found 2015-06-29 11:18:31: (mod_proxy.c.1329) no proxy-handler found for: /myapp
I get the "htdigest" login and then I get a HTTP 500 error.
Any ideas what I could be doing wrong? or perhaps the built-in HTTPS feature is messing it up?
Thanks a lot :)