centos apache搭建https

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

[root@localhostssl]$ apxs

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

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

DocumentRoot"/var/www/api"
ServerNameapi.example.com:443
SSLEngineon
SSLCertificateFile"/etc/httpd/server.crt"
SSLCertificateKeyFile"/etc/httpd/server.key"

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

[root@localhostssl]service httpd restart


注:

server.crt、server.key来自startssl

相关文章

Centos下搭建性能监控Spotlight
CentOS 6.3下Strongswan搭建IPSec VPN
在CentOS6.5上安装Skype与QQ
阿里云基于centos6.5主机VPN配置
CentOS 6.3下配置multipah
CentOS安装、配置APR和tomcat-native