当前位置:论坛首页 > Linux面板 > 求助

【已解答】宝塔面板配置SSL文件后,网站出现错乱

发表在 Linux面板2021-8-10 20:36 [复制链接] 23 11482

具体情况看看图,第一张是没配置证书时正常显示,第二张是配置完后https的显示,结果是错乱的。第三张是配置SSL证书成功的截图
128.PNG
129.PNG
130.PNG
使用道具 举报 只看该作者 回复
发表于 2021-8-11 10:37:27 | 显示全部楼层
看看这个文档 网页存在不安全因素部分
https://cloud.tencent.com/document/product/400/56830
使用道具 举报 回复 支持 1 反对 0
发表于 2021-8-10 20:38:09 | 显示全部楼层
开启强制SSL 强刷新一下浏览器试试
使用道具 举报 回复 支持 反对
发表于 2021-8-10 20:44:39 | 显示全部楼层
F12查看你网站源码是不是有些连接调用的还是http资源导致
使用道具 举报 回复 支持 反对
发表于 2021-8-10 20:55:51 | 显示全部楼层
铭心刻骨 发表于 2021-8-10 20:38
开启强制SSL 强刷新一下浏览器试试

试过了,没用
使用道具 举报 回复 支持 反对
发表于 2021-8-10 21:09:46 | 显示全部楼层
钻头 发表于 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 [DOM] 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 21:10:22 | 显示全部楼层
钻头 发表于 2021-8-10 20:44
F12查看你网站源码是不是有些连接调用的还是http资源导致

但是我用面板强制SSL也不行啊
使用道具 举报 回复 支持 反对
发表于 2021-8-10 21:54:40 | 显示全部楼层
宝塔用户_cvjekb 发表于 2021-8-10 21:10
但是我用面板强制SSL也不行啊

使用的是http.jpg
您好,您网站代码中有写死的http链接,您使用强制https访问的时候,会导致这些写死的http链接出现404 导致样式、模版、图片访问不到
使用道具 举报 回复 支持 反对
发表于 2021-8-10 22:13:14 | 显示全部楼层
大炮运维V587 发表于 2021-8-10 21:54
您好,您网站代码中有写死的http链接,您使用强制https访问的时候,会导致这些写死的http链接出现404 导 ...

那是不是在不修改代码的情况下,HTTPS无法正常访问?
使用道具 举报 回复 支持 反对
发表于 2021-8-10 22:13:52 | 显示全部楼层
大炮运维V587 发表于 2021-8-10 21:54
您好,您网站代码中有写死的http链接,您使用强制https访问的时候,会导致这些写死的http链接出现404 导 ...

那不使用面板,而单独配置SSL证书,交易也是一样的吗?
使用道具 举报 回复 支持 反对
发表于 2021-8-10 22:15:08 | 显示全部楼层
宝塔用户_cvjekb 发表于 2021-8-10 22:13
那是不是在不修改代码的情况下,HTTPS无法正常访问?

关闭强制https就好了
使用道具 举报 回复 支持 反对
发表于 2021-8-10 22:22:56 | 显示全部楼层

我开强制和关强制,效果都一样,都是HTTPS无法正常显示,如果关闭SSL功能,网站恢复正常
使用道具 举报 回复 支持 反对
发表于 2021-8-10 22:51:12 | 显示全部楼层
宝塔用户_cvjekb 发表于 2021-8-10 22:22
我开强制和关强制,效果都一样,都是HTTPS无法正常显示,如果关闭SSL功能,网站恢复正常 ...

你这个是不是WordPress类型的网站?是不是在网站后台设置了http的固定连接?
使用道具 举报 回复 支持 反对
发表于 2021-8-10 22:58:32 | 显示全部楼层
大炮运维V587 发表于 2021-8-10 22:51
你这个是不是WordPress类型的网站?是不是在网站后台设置了http的固定连接? ...

不是这个类型的网站
使用道具 举报 回复 支持 反对
发表于 2021-8-11 09:30:34 | 显示全部楼层

那就排查下代码吧,不要写死固定的链接。
使用道具 举报 回复 支持 反对
发表于 2021-8-11 10:35:22 | 显示全部楼层
你要不就套个cdn cdn那边设置重写
使用道具 举报 回复 支持 反对
12下一页
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急运维服务

响应时间:3分钟

问题处理方式:宝塔专家1对1服务

工作时间:工作日:9:00 - 18:30

宝塔专业团队为您解决服务器疑难问题

点击联系技术免费分析
快速回复 返回顶部 返回列表