centos apache搭建https

前端之家收集整理的这篇文章主要介绍了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

原文链接:https://www.f2er.com/centos/379591.html

猜你在找的CentOS相关文章