美文网首页
ssl配置Apache

ssl配置Apache

作者: 无花无酒_3cd3 | 来源:发表于2019-07-28 14:21 被阅读0次

    https://www.jianshu.com/p/120593b7b123

    第一种,在httpd.conf中添加文件
    Include conf/extra/custom-ssl.conf
    

    custom-ssl.conf

    Listen 443 //这个只能出现一次
    <VirtualHost *:443>
      SSLEngine on
      SSLProtocol all -SSLv2 -SSLv3
      SSLCipherSuite HIGH:!RC4:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!EXP:+MEDIUM
      SSLHonorCipherOrder on
     
       SSLCertificateFile "C:\phpStudy\Apache\conf\cert\a_public.crt" //写绝对路径
      SSLCertificateKeyFile cert/a.key//证书路径
      SSLCertificateChainFile cert/a_chain.crt//证书路径
      DocumentRoot  "C:\WWW" //所放文件路径
      <Directory />
        Options +Indexes +FollowSymLinks +ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
        Require all granted
      </Directory>
    </VirtualHost>
    

    第二种是在vhosts.conf

    Listen 443
    
    <VirtualHost *:443>
        DocumentRoot "D:\WWW"
        ServerName www.buynuywang.com
        ServerAlias buynuywang.com
        SSLEngine on
        SSLProtocol all -SSLv2 -SSLv3 
        SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
        SSLCertificateFile C:\phpStudy\Apache\conf\ssl\4409179_www.buybuywang.com_public.crt   
        SSLCertificateKeyFile C:\phpStudy\Apache\conf\ssl\4409179_www.buybuywang.com.key    
        SSLCertificateChainFile C:\phpStudy\Apache\conf\ssl\4409179_www.buybuywang.com_chain.crt   
    <Directory "D:\WWW">
          Options +Indexes +FollowSymLinks +ExecCGI
          AllowOverride All
          Order allow,deny
          Allow from all
          Require all granted
      </Directory>
    </VirtualHost>
    

    相关文章

      网友评论

          本文标题:ssl配置Apache

          本文链接:https://www.haomeiwen.com/subject/qoaurctx.html