Linux下安装Apache并启用SSL

//系统
# cat /etc/redhat-release 
CentOS Linux release 7.6.1810 (Core)
# uname -r
3.10.0-957.el7.x86_64
# openssl version
OpenSSL 1.0.2k-fips  26 Jan 2017
//关闭SELinux
//关闭firewall或按需打开对应端口
# firewall-cmd --permanent --zone=public --add-service=http
# firewall-cmd --permanent --zone=public --add-service=https
# firewall-cmd --reload
//Apache在默认的CentOS仓库中可用,安装非常简单
# yum -y install httpd
# systemctl enable httpd
# systemctl start httpd
# apachectl -v
Server version: Apache/2.4.6 (CentOS)
Server built:   Apr 24 2019 13:45:48
# whereis httpd
httpd: /usr/sbin/httpd /usr/lib64/httpd /etc/httpd /usr/share/httpd /usr/share/man/man8/httpd.8.gz
//浏览器输入ip或域名测试服务
 http://localhost 
//启用SSL
[在Apache服务器上安装SSL证书](https://help.aliyun.com/document_detail/98727.html?spm=a2c4g.11186623.2.16.66f02242dKtV2j#concept-zsp-d1x-yfb)
//cp申请到的SSL证书到 cert目录
# mkdir /etc/httpd/cert
# tree -N cert/
cert/
├── webb.hgtop.xyz_chain.c
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值