问题
I have a Web service listening on port 8081 (it's a ServiceStack REST Web Service running on mono, if that helps). I am trying to secure it using stunnel, but the problem is as soon as I connect to https://ip, it gets redirected to http://ip:8081, which doesn't make sense to me. Could somebody point me in a direction? My stunnel config file follows:
cert = stunnel.pem
chroot = /usr/local/var/run/stunnel/
pid = /stunnel.pid
setuid = nobody
setgid = nobody
foreground = yes
[https]
accept = 443
connect = 8081
回答1:
Your stunnel config works for me.
It sounds like your webserver is likely sending a 403 redirect, which you do not want.
来源:https://stackoverflow.com/questions/8437399/stunnel-https-gets-redirected-to-http