[英]Apache won't start after enabling SSL for XAMPP
I am running XAMPP v3.2.1 on windows 7. I had it running on port 80 and accessable from my network with no issues. 我在Windows 7上运行XAMPP v3.2.1。我在端口80上运行它,并且可以从我的网络访问它,没有任何问题。
However, when I attempted to enable SSL Apache won't start. 但是,当我尝试启用SSL时,Apache无法启动。
Here is what I did to enable SSL for Appache 这是我为Appache启用SSL所做的工作
I opened a file called https-vhosts.conf
file located at F:\\xamp\\apache\\extra
我打开了一个名为
https-vhosts.conf
文件, https-vhosts.conf
文件位于F:\\xamp\\apache\\extra
and changed the following 并更改了以下内容
<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>
to 至
<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>
I did not change another files or settings beside the mentioned above. 除了上述内容,我没有更改其他文件或设置。
This is what I got in the XAMPP control panel 这就是我在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
What did I miss? 我错过了什么? How can I correct the issue and enable SSL?
如何解决该问题并启用SSL?
I got it to work. 我知道了。 I had the wrong path for the certs
我的证书路径错误
here is how my vhost looks like now 这是我的虚拟主机现在的样子
<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>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.