- 找到conf/httpd.conf
- 取消注释LoadModule ssl_module modules/mod_ssl.so
- 取消注释Include conf/extra/httpd-ssl.conf
- 编辑conf/extra/httpd-ssl.conf,找到<VirtualHost?_default_:443>
SSLCertificateFile "D:/Apache2.2/conf/ssl/www.xxx.com.crt"
SSLCertificateKeyFile "D:/Apache2.2/conf/ssl/www.xxx.com.key"
SSLCertificateChainFile "D:/Apache2.2/conf/ssl/root_bundle.crt"
? ? ? ? 注意:如果配置负载均衡,则还需要在<VirtualHost?_default_:443>中添加JkMount /* controller
如果需要http自动跳转https,需要在conf/httpd.conf中添加
<VirtualHost *:80>
RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)?$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
</VirtualHost>
|