【已解答】宝塔面板配置SSL文件后,网站出现错乱
具体情况看看图,第一张是没配置证书时正常显示,第二张是配置完后https的显示,结果是错乱的。第三张是配置SSL证书成功的截图看看这个文档 网页存在不安全因素部分
https://cloud.tencent.com/document/product/400/56830 开启强制SSL 强刷新一下浏览器试试 F12查看你网站源码是不是有些连接调用的还是http资源导致 铭心刻骨 发表于 2021-8-10 20:38
开启强制SSL 强刷新一下浏览器试试
试过了,没用 钻头 发表于 2021-8-10 20:44
F12查看你网站源码是不是有些连接调用的还是http资源导致
ixed Content: The page at '<URL>' was loaded over HTTPS, but requested an insecure stylesheet '<URL>'. This request has been blocked; the content must be served over HTTPS.
18Mixed Content: The page at '<URL>' was loaded over HTTPS, but requested an insecure script '<URL>'. This request has been blocked; the content must be served over HTTPS.
579Mixed Content: The page at '<URL>' was loaded over HTTPS, but requested an insecure image '<URL>'. This content should also be served over HTTPS.
(index):246 Mixed Content: The page at 'https://www.gydnsc.com/' was loaded over a secure connection, but contains a form that targets an insecure endpoint 'http://www.gydnsc.com/search.php'. This endpoint should be made available over a secure connection.
(index):10827 Mixed Content: The page at 'https://www.gydnsc.com/' was loaded over a secure connection, but contains a form that targets an insecure endpoint 'http://www.gydnsc.com/flow.php'. This endpoint should be made available over a secure connection.
(index):11006 Mixed Content: The page at 'https://www.gydnsc.com/' was loaded over a secure connection, but contains a form that targets an insecure endpoint 'http://www.gydnsc.com/flow.php'. This endpoint should be made available over a secure connection.
(index):11181 Mixed Content: The page at 'https://www.gydnsc.com/' was loaded over a secure connection, but contains a form that targets an insecure endpoint 'http://www.gydnsc.com/user.php'. This endpoint should be made available over a secure connection.
(index):1 Found 2 elements with non-unique id #formCart: (More info: https://goo.gl/9p2vKq) <form id="formCart" name="formCart" method="post" action="flow.php">…</form> <form id="formCart" name="formCart" method="post" action="flow.php">…</form>
(index):1 Mixed Content: The page at 'https://www.gydnsc.com/' was loaded over HTTPS, but requested an insecure favicon 'http://www.gydnsc.com/favicon.ico'. This request has been blocked; the content must be served over HTTPS.
报错是这样的,好像是有些地方仍然调用HTTP 钻头 发表于 2021-8-10 20:44
F12查看你网站源码是不是有些连接调用的还是http资源导致
但是我用面板强制SSL也不行啊
宝塔用户_cvjekb 发表于 2021-8-10 21:10
但是我用面板强制SSL也不行啊
您好,您网站代码中有写死的http链接,您使用强制https访问的时候,会导致这些写死的http链接出现404 导致样式、模版、图片访问不到
大炮运维V587 发表于 2021-8-10 21:54
您好,您网站代码中有写死的http链接,您使用强制https访问的时候,会导致这些写死的http链接出现404 导 ...
那是不是在不修改代码的情况下,HTTPS无法正常访问? 大炮运维V587 发表于 2021-8-10 21:54
您好,您网站代码中有写死的http链接,您使用强制https访问的时候,会导致这些写死的http链接出现404 导 ...
那不使用面板,而单独配置SSL证书,交易也是一样的吗?
宝塔用户_cvjekb 发表于 2021-8-10 22:13
那是不是在不修改代码的情况下,HTTPS无法正常访问?
关闭强制https就好了 大炮运维V587 发表于 2021-8-10 22:15
关闭强制https就好了
我开强制和关强制,效果都一样,都是HTTPS无法正常显示,如果关闭SSL功能,网站恢复正常 宝塔用户_cvjekb 发表于 2021-8-10 22:22
我开强制和关强制,效果都一样,都是HTTPS无法正常显示,如果关闭SSL功能,网站恢复正常 ...
你这个是不是WordPress类型的网站?是不是在网站后台设置了http的固定连接? 大炮运维V587 发表于 2021-8-10 22:51
你这个是不是WordPress类型的网站?是不是在网站后台设置了http的固定连接? ...
不是这个类型的网站 宝塔用户_cvjekb 发表于 2021-8-10 22:58
不是这个类型的网站
那就排查下代码吧,不要写死固定的链接。 你要不就套个cdn cdn那边设置重写
页:
[1]
2