fbpx

Setup FREE SSL for WordPress Bitnami via Google Cloud (GCP)

NEXZ Logo (Circle)

In this quick-start tutorial you will learn how to configure free, auto-renewing SSL certificates for WordPress websites hosted on Google Cloud Platform compute engine using the Bitnami version of WordPress on Google Cloud Platform.

Before getting started with this tutorial, you should have already:

  1. Installed WordPress on Google Cloud
  2. Set up a Domain Name for your website

There are 5 steps in this tutorial:

1. Connect to WordPress via SSH
2. Generate SSL Certificates
3. Configure SSL Certificates
4. Configure HTTPS Redirect
5. Restart Apache Server

1. Connect to WordPress via SSH

Go to your Google Compute homepage and click the hamburger menu in the upper left-hand corner.
Go to your Compute Engine, then to VM instances to access your WordPress installation.
Once inside your Compute Engine, click on the SSH button to connect to your VM Instance.

2. Generate SSL Certificates

Now that you’ve connected to your VM instance, the next step is to copy and paste the certificate issuing command into your terminal. Remember to replace YOURMAIL, YOURDOMAIN, and www.YOURDOMAIN with the correct values.
For example, if your email address is [email protected] and your domains are nexz.io and www.nexz.io, then your certificate issuing command would look like this:

sudo /opt/bitnami/letsencrypt/scripts/generate-certificate.sh -m [email protected] -d nexz.io -d www.nexz.io

3. Configure SSL Certificates

Now that you’ve entered the certificate issuing command, you will be prompted with a series of questions. For each of the three questions, press y and then press Enter.

4. Configure HTTPS Redirect

Now that that the certificates have been configured, the next step is to configure a redirect in your bitnami.conf file in order to redirect all traffic to the HTTPS (secure) version of your website. To do this, copy and paste the command below in order to open the bitnami.conf file for editing.
Now that you’ve opened the bitnami.conf file for editing, copy and paste the the three lines of code below, in the same location as shown in the picture (remember to replace nexz.io with your own domain name). After editing the file, press CTRL+X then Y to save and exit the file.

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/(.*) https://www.1pagezen.com/$1 [R,L]

5. Restart Apache Server

In order for the recent file changes to take effect, you must restart your Apache server. To do this, copy and paste the following command into your terminal in order to restart the Apache server.

sudo /opt/bitnami/ctlscript.sh restart apache

Start typing and press Enter to search

Shopping Cart

No products in the cart.