debian9.9 apache2.4 站点添加ssl证书配置https

37 篇文章 7 订阅

配好的以及原文在这里:http://www.yunwei123.tech/2019/10/13/hello-world/
好像找到的大多数是centos上面的配置方式…而debain上面的apache配置大概有挺大的不同,所以写一个记录一下
首先,ssl的站点配置文件在
/etc/apache2/sites-available/default-ssl.conf
里面
下载好ssl证书文件后,修改上面文件的

# A self-signed (snakeoil) certificate can be created by installing
# the ssl-cert package. See
# /usr/share/doc/apache2/README.Debian.gz for more info.
# If both key and certificate are stored in the same file, only the
# SSLCertificateFile directive is needed.
SSLCertificateFile /etc/ssl/certs/2750681_www.yunwei123.tech.pem
SSLCertificateKeyFile /etc/ssl/private/2750681_www.yunwei123.tech.key

(加粗的这两行)后面文件替换成你的ssl证书;

保存,运行

a2enmod

命令,启动ssl模块;再运行

a2ensite

命令,启动default-ssl站点
然后运行

systemctl reload apache2
systemctl restart apache2

完成x

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值