I can not redirect http to https


I use openlitespeed and install discourse by docker with reserve proxy

I can not force redirect from http to https, I try all this:

  1. Enable force https in admin
  2. Set up app.yml
- replace:
     filename: "/etc/nginx/conf.d/discourse.conf"
     from: /server.+{/
     to: |
       server {
         if ($http_x_forwarded_proto = 'http'){
          return 301 https://$host$request_uri;
  1. Set up htaccess to redirect

Could you help me this issue?

1 Like