Keywords: WordPress - AWS - How to - Secure Connections (SSL/HTTPS) Description:
I’m following this guide but I get stuck with an error:
error: AH00526: Syntax error on line 46 of
/opt/bitnami/apache2/conf/bitnami/bitnami.conf:
SSLCertificateFile: file '/opt/bitnami/apache2/conf/server.crt' does not exist
or is empty
here is my bitnami support ticket a5fe5b94-fd8d-bb3b-6260-20a548ba2672
Can you let me know which guide did you follow and which step failed for you? In your support file, I don’t see any error regarding a missing server.crt file.
I did the steps and on Step 2 it asked me to input a bunch of questions such as company name, country, email add, etc. Is this correct?
Also I did your steps, it says in the Site Information beside the URL of browser that I have Certificate from Let’s Encrypt but how come it still shows the “Your connection to this site is not secure”.
Yes, that is normal when you create a certificate. As you were creating a dummy certificate you could have entered whatever you want. You would only need to specify a domain for the Common Name.
I see that your certificate is properly configured now. However, the browser still shows the page as not secure because of a mixed content issue. This happens when you access the page using https:// but there are some resources (usually images, css or javascript files) that are still loaded using plain http://.
Usually, this can be addressed by configuring your domain name using the proper protocol in the file /opt/bitnami/apps/wordpress/htdocs/wp-config.php.
Hi I changed the code to what you suggested, site is still not secure.
If I force HTTPS access to my website like what you said on this guide, will that resolve my problem with some resources (usually images, css or javascript files) that are still loaded using plain http:// ?
Sometimes it is also necessary to update the domain in the database. Do you mind executing the following command to see if your domain is properly configured in the database?
mysql -u root -p bitnami_wordpress -e "select * from wp_options where option_name='home' || option_name='siteurl';"
When executing the previous command, you will be asked for the mysql root user password. This password should be the same you use to log in to your WordPress as administrator.
If your domain name is not properly configured, you can update the values with these commands:
mysql -u root -p bitnami_wordpress -e 'UPDATE wp_options SET option_value="https://domain.com" WHERE option_name="home"'
mysql -u root -p bitnami_wordpress -e 'UPDATE wp_options SET option_value="https://domain.com" WHERE option_name="siteurl"'
Remember to replace domain.com by your real domain.
No. But it won’t allow users to access using plain HTTP.
If it works correctly in Firefox and Edge but not in Google Chrome, probably there’s some data cached on your Google Chrome browser. Try again after cleaning the cache.