在CentOS 7 1804 中 安装 Apache HTTP Server 并 配置 阿里云 SSL
相关链接:
在CentOS 7 1804 中 安装 Apache HTTP Server 并 配置 腾讯云 SSL
在CentOS 1804 中的 Tomcat 9 设置 SSL( https ) 加密 (多域名加密,阿里云 SSL+ 腾讯云 SSL)
在CentOS 1804 中设置 Apache Tomcat 9.0.12 开机自启
- 安装httpd:
[[email protected] ~]# yum -y install httpd
- 启动httpd:
查看是否启动:[[email protected] ~]# systemctl start httpd.service
[[email protected] ~]# systemctl status httpd.service
- 设置httpd开机自启:
查看是否设置了开机自启:[[email protected] ~]# systemctl enable httpd.service
[[email protected] ~]# systemctl list-unit-files |grep httpd.service
- 查看防火墙是否开启:
开启防火墙:[[email protected] ~]# systemctl status firewalld
[[email protected] ~]# systemctl start firewalld
- 查看防火墙是否开机自启:
开启防火墙的开机自启:[[email protected] ~]# systemctl list-unit-files |grep firewalld
[[email protected] ~]# systemctl enable firewalld.service
- 查看80/443端口是否开放:
开启80/443端口(需要重启防火墙):[[email protected] ~]# firewall-cmd --list-ports
重启防火墙:[[email protected] ~]# firewall-cmd --zone=public --add-port=80/tcp --permanent [[email protected] ~]# firewall-cmd --zone=public --add-port=443/tcp --permanent
[[email protected] ~]# systemctl restart firewalld.service
- 访问httpd:
- 安装mod_ssl:
[[email protected] cert]# yum -y install mod_ssl
- 安装openssl:
[[email protected] cert]# yum -y install openssl
- 上传证书:
- 修改ssl配置文件:
内容如下(指向ssl证书):[[email protected] conf.d]# vim /etc/httpd/conf.d/ssl.conf
SSLCertificateFile /etc/httpd/cert/public.pem SSLCertificateKeyFile /etc/httpd/cert/214951881520647.key SSLCertificateChainFile /etc/httpd/cert/chain.pem
- 重启httpd:
[[email protected] conf.d]# systemctl restart httpd.service
- 访问httpd:
相关链接:
在CentOS 7 1804 中 安装 Apache HTTP Server 并 配置 腾讯云 SSL
在CentOS 1804 中的 Tomcat 9 设置 SSL( https ) 加密 (多域名加密,阿里云 SSL+ 腾讯云 SSL)