灵儿巴斯

 找回密码
 立即注册
查看: 1159|回复: 0

免费申请一个SSL证书

[复制链接]

110

主题

29

回帖

658

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
658
发表于 2023-12-26 23:27:55 | 显示全部楼层 |阅读模式
https://www.bilibili.com/video/a ... d4e43a474401203f485

虽然不懂,按照大老的操作也用上了免费的ssl。
第一步:
https://aq.chinaz.com/ssl/index申请一张免费的证书,并下载下来。

第二步:
登录myssl.com,点工具-》证书链下载。

上传之前申请的cer证书代码,补全后就是你的证书了。
第三步:
到godaddy的后台,直接选择域名,粘贴证书会提示证书无效。应该先安装证书,再把证书绑定给域名。

第四个绑定域名和证书。

最后一步,强制https跳转。
这个在goddady上各种灰色无法设置,怎么开启autossl也开不了,301跳转是可以,但是会有css文件丢失等情况。
就是有部分文件还是按http,无法加载所以网站就排版乱了,查了各种网站查询解决办法还不一样。
最后找到一个通用解决办法。
OpenCart SSL: How to Load All Pages with HTTPS - Blogs | iSenseLabs
直接改网站的代码。

You’ve enabled an SSL certificate for your OpenCart site, but it disappears from some of the pages?
Apache ServerThis tutorial is valid if your OpenCart store is running on an Apache server.

Here’s what you can do to keep every page of your online store secure and ensure your online shoppers feel secure browsing your website.
Step 1
Use your favorite FTP client or File Manager in cPanel and edit your .htaccess file.

Step 2
Copy and Paste these 3 lines of code in the .htaccess file:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Save & close!
Step 3
Edit your config.php file in the OpenCart root (underneath the .htaccess file in the above screenshot).

Under the // HTTPS line, change the protocol from http to https.
Save & close!
Step 4
Repeat the same for the config.php file in your admin folder.

Open the config.php here:

Again, underneath the // HTTPS line change both http protocols to https.

Save & close!
Congratulations!
Now go back to your OpenCart website and go through the pages.

You will see the SSL certificate active all around your website keeping each page secure.
Customers will now feel they’re browsing and shopping securely from your OpenCart store.
Summary
Share this tutorial if it helped you and subscribe to our blog for weekly updates with more helpful guides like this one.

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

粤ICP备2021173439号-2

GMT+8, 2026-4-14 19:51 , Processed in 0.147524 second(s), 18 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表