phpstudy Apache 设置ssl

第一步:修改apache目录下的httpd.conf配置文件

1、#LoadModule ssl_module modules/mod_ssl.so删除行首的配置语句注释符号“#”

2、Include extra/httpd-ssl.conf 将这行的注释的“#”去掉

第二步编辑extra/httpd-ssl.conf文件,修改如下内容:

Listen 443
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
SSLPassPhraseDialog  builtin
SSLSessionCache        "shmcb:D:\phpStudy\Apache/logs/ssl_scache(512000)"
SSLSessionCacheTimeout  300

DocumentRoot "D:\phpStudy\WWW\wwwroot\public"
ServerName www.xiaoyongyuan.com:443
ServerAdmin [email protected]
ErrorLog "D:\phpStudy\Apache/logs/error.log"
TransferLog "D:\phpStudy\Apache/logs/access.log"
SSLEngine on
    SSLCertificateFile "D:\phpStudy\Apache\conf\ssl\2_www.xiaoyongyuan.com.crt"
    SSLCertificateKeyFile "D:\phpStudy\Apache\cert\3_www.xiaoyongyuan.com.key"
    SSLCertificateChainFile "D:\phpStudy\Apache\cert\1_root_bundle.crt"

    SSLOptions +StdEnvVars


    SSLOptions +StdEnvVars

BrowserMatch "MSIE [2-5]" \
         nokeepalive ssl-unclean-shutdown \
         downgrade-1.0 force-response-1.0
CustomLog "D:\phpStudy\Apache/logs/ssl_request.log" \
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
 

重启apache

如果无法重启处理方法

1,cmd->cd到Apache安装目录 -> httpd.exe 查看错误信息  

如何无法访问

1,将域名解析到服务器本地 测试 如果可以访问则说明是端口问题

查看443 端口

你可能感兴趣的:(服务器相关)