Listen 443
<VirtualHost *:443>
DocumentRoot "C:\www"
ServerName ad1.com
SSLEngine on
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
SSLCertificateFile "C:\phpStudy\Apache\conf\ssl/2_ad1.beichenkq.com.crt"
DocumentRoot "C:\www"
<Directory "C:\www">
Options +Indexes +FollowSymLinks +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:443>
DocumentRoot "C:\www"
ServerName ad1.com
SSLEngine on
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
SSLCertificateFile "C:\phpStudy\Apache\conf\ssl/2_ad1.beichenkq.com.crt"
SSLCertificateKeyFiles "C:\phpStudy\Apache\conf\ssl/3_ad1.beichenkq.com.key"
SSLCACertificateFile /etc/apache2/ssl/1_root_bundle.crt
DocumentRoot "C:\www"
<Directory "C:\www">
Options +Indexes +FollowSymLinks +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase / #我这行是没有配置
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
</IfModule>