apache2.2.27开启https功能配置案例

1.需求场景

  配置https访问,相关文件均已得到(jks,pfx crt,cer)。

2.项目环境

apache2.2.27 red hat  linux 6.3

3.解决方案

(1)证书转换(使用crt key)

openssl pkcs12 -in  server.pfx -nokeys -clcerts -out  mycrt.crt

openssl pkcs12 -nocerts -nodes -in server.pfx -out  mykey.key

以上两步,若有密码,请输入密码。

(2)编辑 httpd.conf

开启(去掉#)

#LoadModule ssl_module modules/mod_ssl.so

#Include conf/extra/httpd-ssl.conf

(3)编辑 conf/extra/httpd-ssl.conf

SSLCertificateFile /xxx/xxx/xxx/xx/mycrt.crt 

SSLCertificateKeyFile /xxx/xxx/xxx/xx/mykey.key 

(4)重启apache

sh apachectl start

注意:防火墙配置

引用参考:

https://www.jianshu.com/p/38c4de471b12

https://jingyan.baidu.com/article/ed15cb1b9097a41be2698171.html

https://mp.weixin.qq.com/s/Tw4UzX73Q7MSw3GJXnpN8A

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值