【发布时间】: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?
【问题讨论】: