Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

stunnel https gets redirected to http

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
like image 248
rabin Avatar asked Jun 03 '26 10:06

rabin


1 Answers

Your stunnel config works for me.

It sounds like your webserver is likely sending a 403 redirect, which you do not want.

like image 74
CoreyJJohnson Avatar answered Jun 06 '26 01:06

CoreyJJohnson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!