相關鏈接:
在CentOS 7 1804 中 安裝 Apache HTTP Server 並 配置 騰訊雲 SSL
在CentOS 1804 中的 Tomcat 9 設置 SSL( https ) 加密 (多域名加密,阿里雲 SSL+ 騰訊雲 SSL)
在CentOS 1804 中設置 Apache Tomcat 9.0.12 開機自啓
- 安裝httpd:
[root@CentOS-x86-64-DVD-1804-Desktop ~]# yum -y install httpd
- 啓動httpd:
[root@CentOS-x86-64-DVD-1804-Desktop ~]# systemctl start httpd.service
[root@CentOS-x86-64-DVD-1804-Desktop ~]# systemctl status httpd.service
- 設置httpd開機自啓:
[root@CentOS-x86-64-DVD-1804-Desktop ~]# systemctl enable httpd.service
[root@CentOS-x86-64-DVD-1804-Desktop ~]# systemctl list-unit-files |grep httpd.service
- 查看防火牆是否開啓:
[root@CentOS-x86-64-DVD-1804-Desktop ~]# systemctl status firewalld
[root@CentOS-x86-64-DVD-1804-Desktop ~]# systemctl start firewalld
- 查看防火牆是否開機自啓:
[root@CentOS-x86-64-DVD-1804-Desktop ~]# systemctl list-unit-files |grep firewalld
[root@CentOS-x86-64-DVD-1804-Desktop ~]# systemctl enable firewalld.service
- 查看80/443端口是否開放:
[root@CentOS-x86-64-DVD-1804-Desktop ~]# firewall-cmd --list-ports
[root@CentOS-x86-64-DVD-1804-Desktop ~]# firewall-cmd --zone=public --add-port=80/tcp --permanent [root@CentOS-x86-64-DVD-1804-Desktop ~]# firewall-cmd --zone=public --add-port=443/tcp --permanent
[root@CentOS-x86-64-DVD-1804-Desktop ~]# systemctl restart firewalld.service
- 訪問httpd:
- 安裝mod_ssl:
[root@CentOS-x86-64-DVD-1804-Desktop cert]# yum -y install mod_ssl
- 安裝openssl:
[root@CentOS-x86-64-DVD-1804-Desktop cert]# yum -y install openssl
- 上傳證書:
- 修改ssl配置文件:
[root@CentOS-x86-64-DVD-1804-Desktop 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:
[root@CentOS-x86-64-DVD-1804-Desktop conf.d]# systemctl restart httpd.service
- 訪問httpd:
相關鏈接:
在CentOS 7 1804 中 安裝 Apache HTTP Server 並 配置 騰訊雲 SSL
在CentOS 1804 中的 Tomcat 9 設置 SSL( https ) 加密 (多域名加密,阿里雲 SSL+ 騰訊雲 SSL)