杜坤福博客

Hi, 请登录

为 “护卫神 apache大师”站点添加ssl证书,实现https访问


环境:护卫神 apache大师 2.1.0,Windows 2012 
 
过程: 
 
1. 安装好 “护卫神 apache大师” 软件,开设站点,如本例 mp.anqun.org 
 
 
 
 
 
2. 编辑 C:\HwsApacheMaster\Apache\conf\httpd.conf 文件,搜索 mod_ssl,移除注释符号#(本例第124行); 同理,让 httpd-ssl.conf 配置文件也生效 
 
 
 
 
3. 编辑 C:\HwsApacheMaster\Apache\conf\extra\httpd-ssl.conf 文件,修改 SSLSessionCache 文件的存储路径,使之有效;之后新建一个https的站点配置内容,如本例的 mp.anqun.org,证书文件保存在 C:\HwsApacheMaster\Apache\conf\ssl 目录内 









  1. #   Inter-Process Session Cache:

  2. #   Configure the SSL Session Cache: First the mechanism

  3. #   to use and second the expiring timeout (in seconds).

  4. #SSLSessionCache         "dbm:E:/Huweishen.com/HwsApacheMaster/Apache2.2/logs/ssl_scache"

  5. # SSLSessionCache        "shmcb:E:/Huweishen.com/HwsApacheMaster/Apache2.2/logs/ssl_scache(512000)"

  6. SSLSessionCache        "shmcb:logs/ssl_scache(512000)"

  7. SSLSessionCacheTimeout  300









  8. #   Semaphore:

  9. #   Configure the path to the mutual exclusion semaphore the

  10. #   SSL engine uses internally for inter-process synchronization.

  11. SSLMutex default









  12. ##

  13. ## SSL Virtual Host Context

  14. ##

  15. <VirtualHost *:443>

  16.         SSLEngine on

  17.         SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP

  18.         SSLCertificateFile      "conf\ssl\1_mp.anqun.org_bundle.crt"

  19.         SSLCertificateKeyFile   "conf\ssl\2_mp.anqun.org.key"

  20.         ServerName      "mp.anqun.org"

  21.         DocumentRoot    "C:\HwsApacheMaster\wwwroot\mp_f75yPU"

  22.         





  23.    <Directory "C:/HwsApacheMaster/wwwroot/mp_f75yPU">

  24.         Options FollowSymLinks ExecCGI

  25.     #AddHandler fcgid-script .php

  26.     #FcgidWrapper "/php-cgi.exe" .php

  27.         DirectoryIndex index.html index.htm index.php default.php index.jsp

  28.         AllowOverride All

  29.         Order Deny,Allow

  30.         Allow from all

  31.     </Directory>

  32. </VirtualHost>

 
 
 
4. 重启apache,在浏览器里测试,https访问有效(需在实例安全组规则里开放443端口) 
 
 



相关推荐

评论

  • 昵称 (必填)
  • 邮箱
  • 网址
二维码
评论