文章目录
🟥 将SSL文件放置到服务器中
在C:\SOFT\xampp\apache\conf(找到你的目录)文件夹下新建文件夹:ssl
将你的三个SSL文件放置到该文件夹下。
🟧 修改httpd.conf文件
1️⃣ 去除如下的#
xampp\apache\conf\httpd.conf
LoadModule ssl_module modules/mod_ssl.so
Include conf/extra/httpd-ssl.conf
2️⃣ 替换 Directory 中的内容
将 的内容替换为下方内容:
<Directory />
Options FollowSymLinks
AllowOverride none
Require all granted
</Directory>
3️⃣ 添加字段
文末添加如下字段
RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteCond %{REQUEST_URI} !^/tz.php
RewriteRule (.*) https://%{SERVER_NAME}/$1 [R]
🟨 修改httpd-ssl.conf文件
将 VirtualHost _default 下的内容替换为下方内容
<VirtualHost _default_:443>
DocumentRoot "/FILE/WEB/www" //你的网站文件目录
ServerName localhost:443
SSLEngine on
SSLProtocol all -SSLv2 -SSLv3
SSLCipherSuite HIGH:!RC4:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!EXP:+MEDIUM
SSLHonorCipherOrder on
SSLCertificateFile "conf/ssl/8366540_www.skode.cn_public.crt" //更换为你的crt
SSLCertificateKeyFile "conf/ssl/8366540_www.skode.cn.key" //更换为你的key
SSLCertificateChainFile "conf/ssl/8366540_www.skode.cn_chain.crt" //更换为你的crt
</VirtualHost>
🟩 重启 apache
大家还有什么问题,欢迎在下方留言!
如果你有 技术的问题 或 项目开发
都可以加下方联系方式
和我聊一聊你的故事🧡