我安装了新的 SSL,现在只有一半的站点是安全的?
I Installed a new SSL and now only half of the site is secured?
Note: I checked similar posts but unfortunately I had no luck using their solutions
Take for example this post, SSL only working on half of site where the problem was that he only had the https://
on half of the site, but the problem I'm facing is a bit different since I already have https everywhere yet my site is still half secure and half insecure in its own weird way.
背景:
我刚刚在 Google Cloud MicroServer 内的 Lamp Server - Ubuntu 18.04 LTS version
网站 运行 上安装了一个新的 SSL 证书。
问题: 之后,wp-admin
和 WordPress 站点 本身 显示为不安全但没有红色通知 (与自签名不同),所以我回到我的 apache2 配置并更改了VirtualHost *:80 port to *:443
以及 ServerName myWebsite.com:443
、
我在两个 .conf
文件(SSL 和默认文件)上都这样做了,因为我想知道为什么要使用端口 80?
/var/apache2/sites-available/000-default.conf
/var/apache2/sites-available/default-ssl.conf
(我现在想起来,我忘记在 Listen to port 80 上留下的文件中某处也有 Listen 命令,这可能很重要)
And only after I did that I got this weird new problem where only the wp-admin area is Secured while the homepage itself is Info or Insecure
*(Google terms) - Unlike before I did that change where both the admin panel and the homepage was Insecure *
所以我终于很高兴看到那个绿色的安全图标,但很难过地发现它只在管理面板上有效,而不是在主页上有效,这很奇怪吧?
请看一下图片以更好地理解这个奇怪的问题:
我将非常感谢任何有关此主题的帮助。
在此先致谢。
事实证明,我的网站上有我在添加 SSL 之前上传的那张图片,现在它可能导致了问题,最简单的解决方法是下载 Wordpress 的搜索和替换插件并替换 http://
和 https://
.
感谢@Tim Strawbridge 问了我正确的问题
Mixed Content: The page at 'https://www.******/' was loaded over
HTTPS, but requested an insecure image
'http://www.******/wp-content/uploads/2019/09/8204.jpg'. This content
should also be served over HTTPS.
在 .htaccess 文件中,您可以添加:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Note: I checked similar posts but unfortunately I had no luck using their solutions
Take for example this post, SSL only working on half of site where the problem was that he only had the
https://
on half of the site, but the problem I'm facing is a bit different since I already have https everywhere yet my site is still half secure and half insecure in its own weird way.
背景:
我刚刚在 Google Cloud MicroServer 内的 Lamp Server - Ubuntu 18.04 LTS version
网站 运行 上安装了一个新的 SSL 证书。
问题: 之后,wp-admin
和 WordPress 站点 本身 显示为不安全但没有红色通知 (与自签名不同),所以我回到我的 apache2 配置并更改了VirtualHost *:80 port to *:443
以及 ServerName myWebsite.com:443
、
我在两个 .conf
文件(SSL 和默认文件)上都这样做了,因为我想知道为什么要使用端口 80?
/var/apache2/sites-available/000-default.conf
/var/apache2/sites-available/default-ssl.conf
(我现在想起来,我忘记在 Listen to port 80 上留下的文件中某处也有 Listen 命令,这可能很重要)
And only after I did that I got this weird new problem where only the wp-admin area is Secured while the homepage itself is
Info or Insecure
*(Google terms) - Unlike before I did that change where both the admin panel and the homepage was Insecure *
所以我终于很高兴看到那个绿色的安全图标,但很难过地发现它只在管理面板上有效,而不是在主页上有效,这很奇怪吧?
请看一下图片以更好地理解这个奇怪的问题:
我将非常感谢任何有关此主题的帮助。
在此先致谢。
事实证明,我的网站上有我在添加 SSL 之前上传的那张图片,现在它可能导致了问题,最简单的解决方法是下载 Wordpress 的搜索和替换插件并替换 http://
和 https://
.
感谢@Tim Strawbridge 问了我正确的问题
Mixed Content: The page at 'https://www.******/' was loaded over HTTPS, but requested an insecure image 'http://www.******/wp-content/uploads/2019/09/8204.jpg'. This content should also be served over HTTPS.
在 .htaccess 文件中,您可以添加:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]