Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Cloud Platform: Cannot get https (SSL) working on Wordpress Instance

I'm using Apache/2.2.22 (Debian) on Google Compute Engine with a Wordpress Install (click-to-deploy).

I'm trying to setup an SSL certificate (https) for the Wordpress install. I've created a static IP, a private key, a CSR and have uploaded SSL & intermediate crt files (from freeSSL.com) to etc/apache2/ssl (with the private key) and given this folder root:root permission.

I've followed https://www.digitalocean.com/community/tutorials/how-to-create-a-ssl-certificate-on-apache-for-debian-7 and updated default-ssl config file as instructed (updating pathnames to .crt and .key files, ServerName and ServerAdmin).

I ran a configtest (got syntax OK), enabled default-ssl and rebooted apache. When I visit https://domain or https://ip-address, I get a "This Webpage is Unavailable" error (ERR_CONNECTION_CLOSED). The wordpress install still loads ok on http.

The SSL checker at https://www.digicert.com/help/ gives me a "no certificates found" error, although the certificates are there.

like image 758
james e Avatar asked Nov 01 '22 04:11

james e


1 Answers

Here's what worked for me;

First attempt to enable HTTPS with the checkbox in the Compute | Compute Engine | VM Instances config settings. Should this fail with an error message you can add a firewall rule directly...

On the Compute | Compute Engine | Networks page, select the 'default' network. Then under 'Firewall rules' click 'Add a new rule'. Use the following settings;

Name: allow-https
IP Range: 0.0.0.0/0
Allowed Protocol/Ports: tcp:443
Target tags: http-server

All of the above is assuming that you have exhausted all the other apache configuration options (ports.conf, Virtual Hosts etc).

like image 137
mvanio Avatar answered Nov 09 '22 07:11

mvanio