1.勾选php_openssl
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/4a2404de8bb772d38c8d40d62e8f5c75.png)
2.打开vhosts.conf文件,添加以下代码
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/143b94b58c277ad903f8ff8fe46931a2.png)
Listen 443
<VirtualHost *:443>
DocumentRoot "C:\phpStudy\WWW"
ServerName www.myxxxxxxx.xyz
ServerAlias myxxxxxxx.xyz
SSLEngine on
SSLProtocol TLSv1 TLSv1.1 TLSv1.2
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
SSLCertificateFile "C:\phpStudy\Apache\conf\ssl\2_www.myxxxxxxx.xyz.crt"
SSLCertificateKeyFile "C:\phpStudy\Apache\conf\ssl\3_www.myxxxxxxx.xyz.key"
SSLCertificateChainFile "C:\phpStudy\Apache\conf\ssl\1_root_bundle.crt"
<Directory "C:\phpStudy\WWW">
Options +Indexes +FollowSymLinks +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/da63825d6aa2b56fc1cf55d776a6a4c9.png)
3. 最后重启php