Force ssl redirect on reverse proxy?

6 posts / 0 new
Last post
#1 Tue, 10/25/2016 - 10:47
sespit

Force ssl redirect on reverse proxy?

Hello,

I'm using a Virtualmin virtual host site as a reverse proxy to our Rocket.Chat server. I have a Let's Encrypt cert generated through Virtualmin. However, I'm having a hard time trying to figure out how to force SSL. When I put in https://myserver.com:3000 on the destination, the site fails. http://myserver.com:3000 works just fine, though. Only Safari seems to automatically try https. Firefox and Chrome do not so I'd like to ensure all users are going over https.

Thanks in advance for any advice on how to do this!

  • Ryan
Fri, 10/28/2016 - 09:29
hostile

heres my nginx site config /etc/nginx/sites-enabled/default : https://gyazo.com/93b486863248916ca7f06deff3995d03

add this line :         return 301 https://www.yourdomain.com$request_uri;  

I got rocket chat on https://www.thaiprochat.com/ and it simes works

Fri, 10/28/2016 - 10:10 (Reply to #2)
sespit

Thank you, but unfortunately I'm using Apache to do this. I'm sure the configuration is similar.

Sat, 10/29/2016 - 00:54 (Reply to #3)
hostile

ok, go to "Redirecting HTTP Web Traffic to HTTPS SSL Connection" section in https://techjourney.net/how-to-use-lets-encrypt-ssl-certificate-automati...

hope it helps

Sun, 09/03/2017 - 17:40 (Reply to #4)
snlnz

When I add this line to any sites vhost config I get "too many redirects", strange because if I visit the site via https it comes up perfectly with SSL secured. It's a little ambiguous in the documentation so would be good to see how others have tackled this?

Tue, 09/05/2017 - 17:06
citedinc

Assuming you have both an :80 and :443 vhost config, have you tried adding below to the :80 http vhost config: Redirect / https://myserver.com/

Regards,

Topic locked