Google Cloud Platform:无法在 Wordpress 实例上使用 https (SSL) [英] Google Cloud Platform: Cannot get https (SSL) working on Wordpress Instance

查看:30
本文介绍了Google Cloud Platform:无法在 Wordpress 实例上使用 https (SSL)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Google Compute Engine 上使用 Apache/2.2.22 (Debian) 和 Wordpress 安装(点击部署).

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

我正在尝试为 Wordpress 安装设置 SSL 证书 (https).我已经创建了一个静态 IP、一个私钥、一个 CSR 并上传了 SSL &中间 crt 文件(来自 freeSSL.com)到 etc/apache2/ssl(使用私钥)并授予此文件夹 root:root 权限.

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.

我已关注 https://www.digitalocean.com/community/tutorials/how-to-create-a-ssl-certificate-on-apache-for-debian-7 和更新的 default-ssl 配置文件按照指示(更新 .crt 和 .key 文件的路径名、ServerName 和 ServerAdmin).

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).

我运行了一个配置测试(语法正常),启用了 default-ssl 并重新启动了 apache.当我访问 https://domainhttps://ip-address 时,出现此网页不可用"错误 (ERR_CONNECTION_CLOSED).wordpress 安装在 http 上仍然可以正常加载.

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.

https://www.digicert.com/help/ 上的 SSL 检查器给了我一个未找到证书"错误,尽管证书在那里.

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

推荐答案

这对我有用;

第一次尝试使用 Compute 中的复选框启用 HTTPS |计算引擎 |虚拟机实例配置设置.如果此操作失败并显示错误消息,您可以直接添加防火墙规则...

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

以上所有内容均假设您已用尽所有其他 apache 配置选项(ports.conf、虚拟主机等).

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

这篇关于Google Cloud Platform:无法在 Wordpress 实例上使用 https (SSL)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆