23312321 发表于 2016-12-6 08:51:11

centos apache搭建https

                      $ cd /opt/src/httpd-2.2.29/modules/ssl/

$ apxs
$ /usr/local/apache2/bin/apxs -i -c -a -D HAVE_OPENSSL=1 -I /usr/include/openssl/-lcrypto -lssl -ldl *.c
# vim /etc/httpd/extra/httpd-ssl.conf

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




/usr/local/apache2/bin/httpd -t
service httpd restart

注:
server.crt、server.key来自startssl
                   

页: [1]
查看完整版本: centos apache搭建https