网站⭐Windows下,将xampp升级为https

在这里插入图片描述


🟥 将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

在这里插入图片描述





大家还有什么问题,欢迎在下方留言!


在这里插入图片描述
如果你有 技术的问题 项目开发

都可以加下方联系方式

和我聊一聊你的故事🧡

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值