apache配置https

1. 修改Apache的配置文件httpd.conf

LoadModule ssl_module modules/mod_ssl.so

Include conf/extra/httpd-ssl.conf

 

把前面的#号都去掉

2. 在httpd-ssl.conf文件添加

<VirtualHost test.com:443>
DocumentRoot "网站路径"
ServerName test.com
SSLEngine on
SSLCertificateFile D:\ssl_cert\3jsw.com\domain.crt  ## 你的证书 文件
SSLCertificateKeyFile D:\ssl_cert\3jsw.com\domain.key  ## 你的证书 文件
SSLCertificateChainFile D:\ssl_cert\3jsw.com\ca.crt  ## 你的证书  文件
<Directory "网站路径">   ## 如果出现403有可能就是这里
AllowOverride All
Order Deny,Allow
Allow from all
</Directory>
</VirtualHost>

3. apache重启

4. 有可能出现不会解析php,可能是你的apache重新配置了解析PHP。例如 /php-cgi.exe,这个时候需要在httpd-ssl.conf 文件VirtualHost标签里面 里面添加 

Options FollowSymLinks ExecCGI
AddHandler fcgid-script .php
FcgidWrapper "D:/HwsApacheMaster/php/php56/php-cgi.exe" .php
DirectoryIndex index.html index.htm index.php default.php index.jsp

 

转载于:https://www.cnblogs.com/shaoshao/p/7616079.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值