gpt4 book ai didi

wordpress - 我安装了新的 SSL,现在只有一半的站点是安全的?

转载 作者:太空宇宙 更新时间:2023-11-03 15:09:23 25 4
gpt4 key购买 nike

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.


背景:我刚刚在我的网站上安装了一个新的 SSL 证书,该网站在 Google Cloud MicroServer 内的 Lamp Server - Ubuntu 18.04 LTS version 上运行。


问题: 之后,wp-admin 和 WordPress 网站本身 显示为不安全但没有红色通知 (与自签名不同),所以我回到我的 apache2 配置并将 VirtualHost *:80 端口更改为 *: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 *

所以我终于很高兴看到那个绿色的安全图标,但很遗憾地发现它只在管理面板上有效,而不是在主页上有效,这很奇怪吧?


请看一下图片以更好地理解这个奇怪的问题:

enter image description here

我将非常感谢有关该主题的任何帮助。

在此先致谢。

最佳答案

在 .htaccess 文件中,您可以添加:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

关于wordpress - 我安装了新的 SSL,现在只有一半的站点是安全的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57829924/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com