If you want to force HTTPS in your site, you only need to add the
return 301 https://$host$request_uri; line in the actions when the request is using http. You added the same line in the block for the 443 port and that means that it will always redirect the request. Please remove the second "return 301" line in the
nginx/conf/bitnami/bitnami.conf file and restart NGINX
sudo /opt/bitnami/ctlscript.sh restart nginx
I also suggest you add https in the WP_SITEURL and WP_HOME variables in the apps/wordpress/htdocs/wp-config.php file.
Happy to help!
Was my answer helpful? Click on