【问题标题】:Apache won't start after enabling SSL for XAMPP为 XAMPP 启用 SSL 后 Apache 无法启动
【发布时间】:2015-11-20 22:15:01
【问题描述】:

我在 Windows 7 上运行 XAMPP v3.2.1。我让它在端口 80 上运行,并且可以从我的网络访问,没有任何问题。

但是,当我尝试启用 SSL 时,Apache 无法启动。

这是我为 Appache 启用 SSL 所做的工作

我打开了一个名为 https-vhosts.conf 的文件,该文件位于 F:\xamp\apache\extra

并更改了以下内容

<VirtualHost *:80>

    DocumentRoot "F:/xampp/htdocs/proj1"
    ServerAdmin test@localhost.com
    ServerName server1.domain.com
    ServerAlias server1.domain.com

    <Directory "F:/xampp/htdocs/proj1">
        AllowOverride All
        Order Allow,Deny
        Allow from all
        Require all granted
    </Directory>

</VirtualHost>

<VirtualHost *:443>

    DocumentRoot "F:/xampp/htdocs/proj1"
    ServerAdmin test@localhost.com
    ServerName server1.domain.com
    ServerAlias server1.domain.com

    SSLEngine On
    SSLCertificateFile "F:/xampp/conf/ssl.crt/server.crt"
    SSLCertificateKeyFile "F:/xampp/conf/ssl.key/server.key"


    <Directory "F:/xampp/htdocs/proj1">
        AllowOverride All
        Order Allow,Deny
        Allow from all
        Require all granted
    </Directory>

</VirtualHost>

除了上述之外,我没有更改其他文件或设置。

这是我在 XAMPP 控制面板中得到的

11:24:25 AM  [Apache]   Attempting to start Apache app...
11:24:25 AM  [Apache]   Status change detected: running
11:24:26 AM  [Apache]   Status change detected: stopped
11:24:26 AM  [Apache]   Error: Apache shutdown unexpectedly.
11:24:26 AM  [Apache]   This may be due to a blocked port, missing dependencies, 
11:24:26 AM  [Apache]   improper privileges, a crash, or a shutdown by another method.
11:24:26 AM  [Apache]   Press the Logs button to view error logs and check
11:24:26 AM  [Apache]   the Windows Event Viewer for more clues
11:24:26 AM  [Apache]   If you need more help, copy and post this
11:24:26 AM  [Apache]   entire log window on the forums

我错过了什么? 如何更正此问题并启用 SSL?

【问题讨论】:

    标签: windows apache ssl xampp


    【解决方案1】:

    我让它工作了。我的证书路径错误

    这是我的虚拟主机现在的样子

    <VirtualHost *:443>
    
        DocumentRoot "F:/xampp/htdocs/proj1"
        ServerAdmin test@localhost.com
        ServerName server1.domain.com
        ServerAlias server1.domain.com
    
        SSLEngine On
        SSLCertificateFile "conf/ssl.crt/server.crt"
        SSLCertificateKeyFile "conf/ssl.key/server.key"
    
        <Directory "F:/xampp/htdocs/proj1">
            AllowOverride All
            Order Allow,Deny
            Allow from all
            Require all granted
        </Directory>
    
    </VirtualHost>
    

    【讨论】:

      猜你喜欢
      • 2012-11-29
      • 2018-02-28
      • 1970-01-01
      • 2015-07-13
      • 1970-01-01
      • 2020-10-18
      • 2015-05-29
      • 2018-06-18
      • 1970-01-01
      相关资源
      最近更新 更多