awsdiscourse

Enable SSL in Discourse

First, configure Apache to enable SSL connections. Then, force HTTPS for all Discourse links using one of the following options:

  • Enable the following option in the Discourse config file at /opt/bitnami/apps/discourse/htdocs/config/site_settings.yml:

    security:
      force_https:
        default: true
    

    NOTE: In older Discourse versions, the option name is use_ssl or use_https.

  • If the HTTPS port is not the standard port 443, update the HTTPS port entry in the database by following the steps below:

    • Log in to the server console.
    • Start the PostgreSQL command-line client and connect to the PostgreSQL database.
    • Execute the following SQL command, replacing the NEW_PORT placeholder with the number of the SSL port.

      bitnami_discourse=# UPDATE site_settings SET value = 'NEW_PORT' WHERE name = 'port'
      
  • Disable HTTP and redirect all requests to HTTPS URLs.

  • Restart the server:

    $ sudo /opt/bitnami/ctlscript.sh restart
    
Last modification April 23, 2019