1, first in the httpd.conf inside modify several places
Find #LoadModule ssl_module modules/mod_ssl.so remove the front #
Include conf/vhosts.conf add a line below this line include conf/vhosts_ssl.conf and then go to conf folder inside Create vhosts_ssl.conf
2. Write in vhosts_ssl.conf
Listen 443
Sslstrictsnivhostcheck off
Sslciphersuite aesgcm:all:! Dh:! export:! rc4:+high:! medium:! Low:!anull:!enull
Sslprotocol All-sslv2-sslv3
<virtualhost *:443>
documentroot "D:\phpStudy\zhifu"
ServerName www.ceshi.com
Serveralias ceshi.com
<directory "D:\phpStudy\zhifu" >
Options followsymlinks execcgi
allowoverride All
Order Allow,deny
allow from all
Require All granted
</Directory>
Sslengine on
sslcertificatefile "D:\PHPSTUDY\APACHE\CONF\ZHENG\2_WWW.CESHI.COM.CRT"
sslcertificatekeyfile "D:\phpStudy\Apache\conf\zheng\3_www.ceshi.com.key"
sslcertificatechainfile "D:\PHPSTUDY\APACHE\CONF\ZHENG\1_ROOT_BUNDLE.CRT"
</VirtualHost>
3, the certificate is uploaded to the corresponding path of the configuration written above
4. Configure automatic jump in vhosts.conf
<virtualhost *:80>
documentroot "D:\phpStudy\zhifu"
ServerName www.ceshi.com
Serveralias ceshi.com
Rewriteengine on
rewriterule (. *) https://%{server_name}$1 [R]
<directory "D:\phpStudy\zhifu" >
Options followsymlinks execcgi
allowoverride All
Order Allow,deny
allow from all
Require All granted
</Directory>
</VirtualHost>
5, the above should pay attention, I write the Ceshi place, all must change to own
HTTPS----------How to configure Apache HTTPS access in a phpstudy environment and access HTTP to automatically jump to HTTPS