![]() If your SSL certificates were configured properly, you will notice that your website is being loaded with a green padlock icon. Also, if your configuration isn't working properly, check out the tutorial below to learn about common SSL errors and how to fix them. Now that you've completed the tutorial, you should configure your certificates to auto-renew using this tutorial. sudo /opt/bitnami/ctlscript.sh restart apache Restart your Apache Server In order for your certificate changes to take effect, you need to restart you Apache server by entering the command below. For example:Īfter adding this code, enter CTRL+o to save changes, followed by CTRL+x to exit back to your home screen.Ĩ. Remember to replace 1pagezen with either the version of your domain name - whichever your prefer. sudo nano /opt/bitnami/apps/wordpress/htdocs/wp-config.php Inside of your wp-config.php file, you will need to replace your SiteURL and HomeURL definitions as shown below. In order to open your wp-config.php file for editing, SSLCertificateChainFile "/etc/letsencrypt/live//chain.pem"Ĭhanging your website URLs via Settings > General is disabled in the Bitnami version, so you'll need to change your URLs by editing your wp-config.php folder. SSLCertificateKeyFile "/etc/letsencrypt/live//privkey.pem" SSLCertificateFile "/etc/letsencrypt/live//cert.pem" Place a # sign next to each of the two placeholder certificates, and paste the path to your three SSL certificate files as shown in the command below, making sure to replace with your own domain name. Redirect permanent / Next, use the down-arrow key to scroll down the page. (Update : 'permanent' added to code to mark redirect as a 301 instead of 302). Remember to replace with your own domain name. This will tell the server to always serve your website's pages with HTTPS encryption. Next, paste the following 3-lines of code below the DocumentRoot line of the nf file. sudo nano /opt/bitnami/apache2/conf/bitnami/nf First, execute the command below to open your nf file for editing. Configure the Certificates The next step is to configure your certificates. certbot-auto renew -quiet -no-self-upgradeĪfter adding this code, enter ctrl+o to save changes, followed by ctrl+x to exit back to your home screen.Ħ. certbot-auto renew -quiet -no-self-upgradeĠ 12 * * *. The command will tell Certbot to check for renewals twice per day. 1 Now that you’ve created a new crontab file, scroll to the bottom and paste the commands listed below. Nano (1) is the easiest text editor to use. ![]() sudo crontab -e After entering the crontab -e command, choose the text editor to use to create the crontab. In order to program your certificates to automatically renew themselves, you need to configure a crontab that will automatically renew the SSL certificates before they expire. Before configuring auto-renewal, you should skip to step 6 and finish the tutorial first. For updated instructions on configuring auto-renewal, click here. Important Notice: The auto-renew configuration instructions outlined in this section are no longer valid. ![]() Test Certificate Renewal Before setting up auto-renewal for your certificates, you are first going to execute the commands below in order to test the auto-renewal function./certbot-auto renew -dry-run If you get a success message, it means that the certificates are renewing properly. Note: Instructions for testing the certificate auto-renew script were moved here.Ĥ. ![]() Take note of the directory where your certificates are installed. Remember to replace with your own domain name./certbot-auto certonly -webroot -w /opt/bitnami/apps/wordpress/htdocs/ -d -d After entering these commands, your certificates will be generated. ![]() Generate Certificates In this step you are going to execute the command below in order to tell the Certbot client to create SSL certificates for your website. wget & chmod a+x certbot-autoĪfter executing each of these commands, you can either stay in the same SSH window or exit and open a new one.ģ. The Certbot client is used to issue the SSL certificates that will be used later on in this tutorial. Install CertBot Client Now that you’ve connected to your website’s Apache server, you are going to execute the command to install the Certbot client. Once inside your Compute Engine, click on the SSH button to connect to your WordPress installation.Ģ. Go to your Compute Engine, then to VM instances to access your WordPress installation. Connect to WordPress via SSH Go to your Google Compute homepage and click the hamburger menu in the upper left-hand corner. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |