[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
原文地址:http://7907781.blog.51cto.com/7897781/1879489