1,php环境7.0.1.2
2,php扩展启动php_openssl
3,php扩展及设置允许目录列表
4,打开修改httpd.conf配置文件,打开找到#LoadModule ssl_module modules/mod_ssl.so,去掉前面的注释符#(保证前面没有#号),使得ssl模块生效
5,增加httpd.conf 配置
Include conf/vhosts.conf
Include conf/vhostssl.conf(这个vhostssl是自己建的,所以不要打开原始的Include conf/extra/httpd-ssl.conf)
6,在conf 目录下添加文件vhostssl.conf (E:\phpStudy\Apache\conf)
vhostssl.conf内容:
Listen 443
<VirtualHost :443>
DocumentRoot “D:\phpStudy\PHPTutorial\WWW\ep\public”
ServerName www.ep.com
ServerAlias ep.com
SSLEngine on
SSLProtocol TLSv1 TLSv1.1 TLSv1.2
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
SSLCertificateFile “D:\phpStudy\PHPTutorial\WWW\ep\1650575_www.ep.com_public.crt”
SSLCertificateKeyFile “D:\phpStudy\PHPTutorial\WWW\ep\1650575_www.ep.com.key”
SSLCertificateChainFile “D:\phpStudy\PHPTutorial\WWW\ep\1650575_www.ep.com_chain.crt”
<Directory “D:\phpStudy\PHPTutorial\WWW\ep\public”>
Options +Indexes +FollowSymLinks +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
7,新建ep目录,在E:\phpStudy\Apache\conf\下面,添加三个文件
1650575_www.ep.com_public.crt
1650575_www.ep.com.key
1650575_www.ep.com_chain.crt
8,项目目录下.htaccess内容
phpstudy关于SSL https配置
最新推荐文章于 2021-03-20 07:25:01 发布