list123342 发表于 2018-11-19 09:18:08

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
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