- 之前使用的是阿里的证书,https也是在nginx下配置,现在用到了apache的配置(用于小程序的https需求,记录一下以后好用)
- Nginx配置
http://t.cn/Run1Yv5
http://t.cn/Run1Qpz
- 首先开启apache的ssl模块 extension=php_openssl.dll
- 打开修改httpd.conf配置文件
增加一条引用语句 Include conf/vhosts_ssl.conf
Listen 443
<VirtualHost *:443>
DocumentRoot "D:\WWW\ycmlapp\public"
ServerName ****
ServerAlias ****
SSLEngine on
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD
<Directory "D:\WWW\app\public">
Options +Indexes +FollowSymLinks +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
SSLCertificateFile "D:\Apache\conf\ssl\214248979770222.pem"
SSLCertificateKeyFile "D:\Apache\conf\ssl\2142489797722.key"
</VirtualHost>