首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >debian9.9 apache2.4 站点添加ssl证书配置https

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

作者头像
云微
发布2023-02-11 09:52:33
发布2023-02-11 09:52:33
7910
举报

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

代码语言:javascript
复制
# 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证书;

保存,运行

代码语言:javascript
复制
a2enmod

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

代码语言:javascript
复制
a2ensite

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

代码语言:javascript
复制
systemctl reload apache2
systemctl restart apache2

完成x

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2019-10-23,如有侵权请联系 cloudcommunity@tencent.com 删除
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档