Force ssl redirect on reverse proxy?


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 on the destination, the site fails. 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

heres my nginx site config /etc/nginx/sites-enabled/default :

add this line :         return 301$request_uri;  

I got rocket chat on and it simes works

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

ok, go to “Redirecting HTTP Web Traffic to HTTPS SSL Connection” section in

hope it helps

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?

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