腾讯云CentOS Apache开启HTTPS
2023-09-14 09:08:41 时间
1.申请SSL证书
https://console.qcloud.com/ssl?utm_source=yingyongbao&utm_medium=ssl&utm_campaign=qcloud
2.配置Linux服务器
首先安装openssl
# yum install mod_ssl openssl
然后将我们第一步生成的SSL上传到服务器
# cp www.bincoding.cn.crt /etc/pki/tls/certs/ # cp www.bincoding.cn.key /etc/pki/tls/private/
进入/etc/pki/tls/private/目录:生成csr文件
openssl req -new -key www.bincoding.cn.key -out www.bincoding.cn.csr
中间需要输入证书信息
[root@VM_238_215_centos private]# openssl req -new -key www.bincoding.cn.key -out www.bincoding.cn.csr You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [XX]:CN State or Province Name (full name) []:ChongQing Locality Name (eg, city) [Default City]:ChongQing Organization Name (eg, company) [Default Company Ltd]: Organizational Unit Name (eg, section) []: Common Name (eg, your name or your server's hostname) []: Email Address []:
3.配置Apache 服务器
# vim /etc/httpd/conf.d/ssl.conf
### overwrite the following parameters ### SSLCertificateFile /etc/pki/tls/certs/www.bincoding.cn.crt SSLCertificateKeyFile /etc/pki/tls/private/www.bincoding.cn.key ### The following parameter does not need to be modified in case of a self-signed certificate. ### ### If you are using a real certificate, you may receive a certificate bundle. The bundle is added using the following parameters ### SSLCertificateChainFile /etc/pki/tls/certs/example.com.ca-bundle
然后重启httpd
# service httpd restart
重启成功后apache已经支持https了~
相关文章
- linux apache安装与配置_Apache配置
- Apache配置虚拟主机_apache中配置虚拟主机的作用
- linux修改文件权限为root_centos修改文件权限
- 为CentOS升级OpenSSL 让Nginx支持TLS 1.2
- 教你如何处理CentOS 7忘记密码解决方法过程图解
- 服务器Centos安装MySql并通过连接Navicat详细步骤
- Python 获取CentOS主机信息详解编程语言
- CentOS安装Oracle数据库的步骤(centos安装oracle)
- 在Linux(Debian/Ubuntu、RHEL/CentOS)搭建数据库MariaDB
- 在Linux(Debian/Ubuntu、RHEL/CentOS)搭建phpMyAdmin
- CentOS出现ifconfig: command not found的解决办法
- 如何在CentOS 8上安装Apache Maven
- 之一centos探索CentOS:Linux的另一分支(linux的分支)
- 如何在 CentOS 中添加、启用和禁用一个仓库
- 实现Linux搭建Apache服务器的简单指南(linux装apache)
- CentOS上安装MySQL简单又安全(centos加mysql)
- 配置CentOS下MySQL安装与配置指南(centos中mysql)
- centOS安装MySQL更为稳定便捷的选择(centos-mysql)
- Apache与MySQL联动改变Web服务(apache跟mysql)
- Apache与MySQL的完美融合开启精彩程序之旅(apache加mysql)
- CentOS(Linux)下的apache服务器配置与管理方法分享
- win8下XAMPP中Apache模块无效(apache无法打开)的解决方法
- Linux+php+apache+oracle环境搭建之CentOS下安装Apache
- Linux+php+apache+oracle环境搭建之CentOS下安装Oracle数据库