在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 开机自启

在tomcat中设置http自动跳转https


  1. 安装httpd:
    [root@CentOS-x86-64-DVD-1804-Desktop ~]# yum -y install httpd
    
  2. 启动httpd:
    [root@CentOS-x86-64-DVD-1804-Desktop ~]# systemctl start httpd.service
    查看是否启动:
    [root@CentOS-x86-64-DVD-1804-Desktop ~]# systemctl status httpd.service
  3. 设置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
  4. 查看防火墙是否开启:
    [root@CentOS-x86-64-DVD-1804-Desktop ~]# systemctl status firewalld
    开启防火墙:
    [root@CentOS-x86-64-DVD-1804-Desktop ~]# systemctl start firewalld
  5. 查看防火墙是否开机自启:
    [root@CentOS-x86-64-DVD-1804-Desktop ~]# systemctl list-unit-files |grep firewalld
    开启防火墙的开机自启:
    [root@CentOS-x86-64-DVD-1804-Desktop ~]# systemctl enable firewalld.service
  6. 查看80/443端口是否开放:
    [root@CentOS-x86-64-DVD-1804-Desktop ~]# firewall-cmd --list-ports
    开启80/443端口(需要重启防火墙):
    [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
  7. 访问httpd:

     
  8. 安装mod_ssl:
    [root@CentOS-x86-64-DVD-1804-Desktop cert]# yum -y install mod_ssl
  9. 安装openssl:
    [root@CentOS-x86-64-DVD-1804-Desktop cert]# yum -y install openssl
  10. 上传证书:

     
  11. 修改ssl配置文件:
    [root@CentOS-x86-64-DVD-1804-Desktop conf.d]# vim /etc/httpd/conf.d/ssl.conf
    内容如下(指向ssl证书):
    SSLCertificateFile /etc/httpd/cert/2_https.wimcn.cn.crt
    SSLCertificateKeyFile /etc/httpd/cert/3_https.wimcn.cn.key
    SSLCACertificateFile /etc/httpd/cert/1_root_bundle.crt
  12. 重启httpd:
    [root@CentOS-x86-64-DVD-1804-Desktop conf.d]# systemctl restart httpd.service
  13. 访问httpd:

相关链接:

在CentOS 7 1804 中 安装 Apache HTTP Server 并 配置 阿里云 SSL

在CentOS 1804 中的 Tomcat 9 设置 SSL( https ) 加密 (多域名加密,阿里云 SSL+ 腾讯云 SSL)

在CentOS 1804 中设置 Apache Tomcat 9.0.12 开机自启

在tomcat中设置http自动跳转https

猜你喜欢

转载自blog.csdn.net/qq_32596527/article/details/83041763