码迷,mamicode.com
首页 > Web开发 > 详细

centos apache搭建https

时间:2016-12-05 15:03:47      阅读:181      评论:0      收藏:0      [点我收藏+]

标签:centos apache ssl

[root@localhost ~]$ cd /opt/src/httpd-2.2.29/modules/ssl/

[root@localhost ssl]$ apxs

[root@localhost ssl]$ /usr/local/apache2/bin/apxs -i -c -a -D HAVE_OPENSSL=1 -I /usr/include/openssl/  -lcrypto -lssl -ldl *.c

[root@localhost ssl]# vim /etc/httpd/extra/httpd-ssl.conf

DocumentRoot "/var/www/api"
ServerName api.example.com:443
SSLEngine on
SSLCertificateFile "/etc/httpd/server.crt"
SSLCertificateKeyFile "/etc/httpd/server.key"

[root@localhost ssl] /usr/local/apache2/bin/httpd -t

[root@localhost ssl] service httpd restart


注:

server.crt、server.key来自startssl

centos apache搭建https

标签:centos apache ssl

原文地址:http://7907781.blog.51cto.com/7897781/1879489

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!