腾讯云CentOS Apache开启HTTPS
2016-10-12 13:21
555 查看
1.申请SSL证书
https://console.qcloud.com/ssl?utm_source=yingyongbao&utm_medium=ssl&utm_campaign=qcloud
2.配置Linux服务器
首先安装openssl
然后将我们第一步生成的SSL上传到服务器
进入/etc/pki/tls/private/目录:生成csr文件
中间需要输入证书信息
3.配置Apache 服务器
然后重启httpd
重启成功后apache已经支持https了~
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了~
相关文章推荐
- CentOS 下安装 Apache 和 PHP 并开启 mcrypt 扩展
- 阿里云服务器centos7.4操作系统Apache配置https服务
- apache开启https
- Centos系统thinkphp发布时,apache配置成https访问时,url地址无法访问问题
- CentOs开启Apache的rewrite_module模块,支持.htaccess
- 腾讯云CentOS7 LAMP(linux的apache MariaDB php)yum方式部署
- CentOS 7.4 firewall 开启http/https 服务
- linux centos apache开启gzip的方法
- apache和nginx开启https
- apache开启https
- centos 开启apache伪静态
- centos7搭建SVN+Apache+IF.svnadmin支持https实现web管理SVN
- 在CentOS配置Apache的HTTPS服务
- Centos6.3下Apache配置https证书访问
- centos配置apache的https服务
- CentOS 6.5系统下配置Apache的https证书
- CentOS下Apache开启Gzip网页压缩功能
- CentOS搭建PHP+Apache环境+apache虚拟主机配置+apache非停状态删日志后异常+php开启openssl+php日志记录
- CentOS6下Apache服务器开启webDAV模块
- 腾讯云Centos开启IPV6