护卫神apache|nginx大师站点添加ssl证书,实现https访问
环境:护卫神 apache大师 2.1.0,Windows 2012
过程:
1. 安装好 “护卫神 apache大师” 软件,开设站点,如本例 mp.anqun.org
http://bbs.aliyun.com/attachment/Fid_239/239_1477160476054779_f0ff775ca361463.png?33
http://bbs.aliyun.com/attachment/Fid_239/239_1477160476054779_d5bdf2b4a054abb.png?29
2. 编辑 C:\HwsApacheMaster\Apache\conf\httpd.conf 文件,搜索 mod_ssl,移除注释符号#(本例第124行); 同理,让 httpd-ssl.conf 配置文件也生效
http://bbs.aliyun.com/attachment/Fid_239/239_1477160476054779_65d65ecd6f0d5c7.png?12
http://bbs.aliyun.com/attachment/Fid_239/239_1477160476054779_f6b137250ec6567.png?7
3. 编辑 C:\HwsApacheMaster\Apache\conf\extra\httpd-ssl.conf 文件,修改 SSLSessionCache 文件的存储路径,使之有效;之后新建一个https的站点配置内容,如本例的 mp.anqun.org,证书文件保存在 C:\HwsApacheMaster\Apache\conf\ssl 目录内
复制代码
[*]
[*]
[*]
[*]
[*]
[*]
[*]
[*]
[*]# Inter-Process Session Cache:
[*]# Configure the SSL Session Cache: First the mechanism
[*]# to use and second the expiring timeout (in seconds).
[*]#SSLSessionCache "dbm:E:/Huweishen.com/HwsApacheMaster/Apache2.2/logs/ssl_scache"
[*]# SSLSessionCache "shmcb:E:/Huweishen.com/HwsApacheMaster/Apache2.2/logs/ssl_scache(512000)"
[*]SSLSessionCache "shmcb:logs/ssl_scache(512000)"
[*]SSLSessionCacheTimeout300
[*]
[*]
[*]
[*]
[*]
[*]
[*]
[*]
[*]# Semaphore:
[*]# Configure the path to the mutual exclusion semaphore the
[*]# SSL engine uses internally for inter-process synchronization.
[*]SSLMutex default
[*]
[*]
[*]
[*]
[*]
[*]
[*]
[*]
[*]##
[*]## SSL Virtual Host Context
[*]##
[*]<VirtualHost *:443>
[*] SSLEngine on
[*] SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP
[*] SSLCertificateFile "conf\ssl\1_mp.anqun.org_bundle.crt"
[*] SSLCertificateKeyFile "conf\ssl\2_mp.anqun.org.key"
[*] ServerName "mp.anqun.org"
[*] DocumentRoot "C:\HwsApacheMaster\wwwroot\mp_f75yPU"
[*]
[*]
[*]
[*]
[*]
[*] <Directory "C:/HwsApacheMaster/wwwroot/mp_f75yPU">
[*] Options FollowSymLinks ExecCGI
[*] #AddHandler fcgid-script .php
[*] #FcgidWrapper "/php-cgi.exe" .php
[*] DirectoryIndex index.html index.htm index.php default.php index.jsp
[*] AllowOverride All
[*] Order Deny,Allow
[*] Allow from all
[*] </Directory>
[*]</VirtualHost>
http://bbs.aliyun.com/attachment/Fid_239/239_1477160476054779_ac1457509c8554d.png?50
4. 重启apache,在浏览器里测试,https访问有效(需在实例安全组规则里开放443端口)
http://bbs.aliyun.com/attachment/thumb/Fid_239/239_1477160476054779_4a4d1cf12916b8e.png?6
http://bbs.aliyun.com/attachment/Fid_239/239_1477160476054779_672c4228eb21ed0.png?34
页:
[1]