gpt4 book ai didi

windows - 为 XAMPP 启用 SSL 后 Apache 无法启动

转载 作者:太空宇宙 更新时间:2023-11-03 14:53:21 29 4
gpt4 key购买 nike

我在 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?

最佳答案

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

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

<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>

关于windows - 为 XAMPP 启用 SSL 后 Apache 无法启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32233979/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com