ssl配置Apache

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

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

custom-ssl.conf

Listen 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" //所放文件路径
  
    Options +Indexes +FollowSymLinks +ExecCGI
    AllowOverride All
    Order allow,deny
    Allow from all
    Require all granted
  

第二种是在vhosts.conf

Listen 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   

      Options +Indexes +FollowSymLinks +ExecCGI
      AllowOverride All
      Order allow,deny
      Allow from all
      Require all granted
  

你可能感兴趣的:(ssl配置Apache)