apache windows 无法开启 https 错误记录

最近在本地测试时候
发现Apache 虚拟配置的位置该表会导致,https无法访问

正确配置 两个网站都可以访问

<VirtualHost *:443>
    DocumentRoot "C:\php\www\h5\api"
    ServerName wx.iguojin.com
    ServerAlias 

    SSLEngine on
    #SSLProtocol TLSv1 TLSv1.1 TLSv1.2
    SSLProtocol all -SSLv2 -SSLv3
    #SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
    SSLCipherSuite AESGCM:ALL:!DH:!EXPORT:!RC4:+HIGH:!MEDIUM:!LOW:!aNULL:!eNULL

    SSLCertificateFile "C:/php/Apache/conf/ssl/2_wx.iguojin.com.crt"
    SSLCertificateKeyFile "C:/php/Apache/conf/ssl/3_wx.iguojin.com.key"
    SSLCertificateChainFile "C:/php/Apache/conf/ssl/1_root_wx.iguojin.crt"

    Errorlog  "C:\php\Apache\logs\wxiguojin.log"
      
  <Directory "C:\php\www\h5\api">
      Options FollowSymLinks ExecCGI
      AllowOverride All
      Order allow,deny
      Allow from all
      Require all granted
  </Directory>
</VirtualHost>

<VirtualHost *:443>
    DocumentRoot "C:\php\www\h5\hsbc\api\public"
    ServerName hsbc.iguojin.com
    ServerAlias 
  <Directory "C:\php\www\h5\hsbc\api\public">
      Options FollowSymLinks ExecCGI
      AllowOverride All
      Order allow,deny
      Allow from all
      Require all granted
  </Directory>
</VirtualHost>

错误配置 只有第一个网站可以访问

<VirtualHost *:443>
    DocumentRoot "C:\php\www\h5\hsbc\api\public"
    ServerName hsbc.iguojin.com
    ServerAlias 
  <Directory "C:\php\www\h5\hsbc\api\public">
      Options FollowSymLinks ExecCGI
      AllowOverride All
      Order allow,deny
      Allow from all
      Require all granted
  </Directory>
</VirtualHost>

<VirtualHost *:443>
    DocumentRoot "C:\php\www\h5\api"
    ServerName wx.iguojin.com
    ServerAlias 

    SSLEngine on
    #SSLProtocol TLSv1 TLSv1.1 TLSv1.2
    SSLProtocol all -SSLv2 -SSLv3
    #SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
    SSLCipherSuite AESGCM:ALL:!DH:!EXPORT:!RC4:+HIGH:!MEDIUM:!LOW:!aNULL:!eNULL

    SSLCertificateFile "C:/php/Apache/conf/ssl/2_wx.iguojin.com.crt"
    SSLCertificateKeyFile "C:/php/Apache/conf/ssl/3_wx.iguojin.com.key"
    SSLCertificateChainFile "C:/php/Apache/conf/ssl/1_root_wx.iguojin.crt"

    Errorlog  "C:\php\Apache\logs\wxiguojin.log"
      
  <Directory "C:\php\www\h5\api">
      Options FollowSymLinks ExecCGI
      AllowOverride All
      Order allow,deny
      Allow from all
      Require all granted
  </Directory>
</VirtualHost>

相关文章

此处评论已关闭