需要在httpd.conf中添加以及开启mod_ssl模块12Listen 443LoadModule ssl_module modules/mod_ssl.so 修改vhost.conf文件1234567891011121314151617181920212223242526272829303132<VirtualHost *:80 *:443>DocumentRoot "/webapps/zabbix"ServerName www.server.comServerAlias jp130.com#域名重定向RewriteEngine OnRewriteCond %{HTTP_HOST} ^www.server.com$RewriteRule ^/(.*)$ https://jp130.com/$1 [R=301,L]#RewriteEngine on#RewriteCond %{SERVER_PORT} !^443$#RewriteRule ^(.*)?$ https://%{SERVER_NAME}$1 [L,R]#httpsSSLEngine onSSLCompression offSSLProtocol all -SSLv2 -SSLv3SSLCipherSuite ECDH:AESGCM:HIGH:!DH:!RC4:!aNULL:!eNULLSSLCertificateFile /usr/local/ssl/jp130.com.crtSSLCertificateKeyFile /usr/local/ssl/jp130.key#SSLCertificateChainFile /usr/local/ssl/root_bundle.crt#日志CustomLog "logs/access.log" combinedErrorLog "logs/error.log"<Directory "/webapps/zabbix"> Options FollowSymLinks Require all granted DirectoryIndex index.php index.html</Directory></VirtualHost>