如何設(shè)置apache服務(wù)安裝ssl證書
2017-11-10 22:29:54
10661
這里以widnows下安裝apache為實(shí)例:
1.安裝apache和php這里請(qǐng)參考http://www.tjdsmy.cn/help/show-4824(這里以apache使用fcgi的方式調(diào)用php)
2.apache和php安裝之后,打開http.con文件中把mod_ssl.so的注釋去掉

3.在httpd.conf文件中找到httpd-ssl.conf把注釋去掉
4.在conf/extra/httpd-ssl.conf文件建立https站點(diǎn)(其實(shí)和我們平時(shí)在httpd-vhost.conf中建立的網(wǎng)站是一樣的,只是多了引入證書的鏈接),如下:
<VirtualHost *:443>
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
SSLCertificateFile D:\wwwroot\discuz\ssl\certificate.crt
SSLCertificateKeyFile D:\wwwroot\discuz\ssl\private.key
SSLCertificateChainFile D:\wwwroot\discuz\ssl\ca_bundle.crt
ServerAdmin webmaster@dummy-host.cc.com
DocumentRoot "D:/wwwroot/discuz"
ServerName xn--eqvw44d.com
ServerAlias www.tjdsmy.cn
ErrorLog "logs/discuz.com-error.log"
CustomLog "logs/discuz.com-access.log" common
FcgidInitialEnv PHPRC "C:/php/5.3"
FcgidWrapper "C:/php/5.3/php-cgi.exe" .php
<Directory d:/wwwroot/discuz>
Options FollowSymLinks ExecCGI
AllowOverride all
Require all granted
</Directory>
</VirtualHost>

5.測(cè)試
