generaldreamfactory

Force HTTPS redirection with Nginx

Modify the /opt/bitnami/nginx/conf/bitnami/bitnami.conf file so that it looks like this:

server {
      listen 80;
      server_name localhost;
      return 301 https://$host$request_uri;
      include "/opt/bitnami/nginx/conf/bitnami/bitnami-apps-prefix.conf";
  }

After modifying the Nginx configuration file:

  • Open port 443 in the server firewall. Refer to the FAQ for more information.

  • Restart Nginx to apply the changes.