【发布时间】:2015-01-31 19:24:13
【问题描述】:
我确信这个问题被问了很多次,但我没有遇到任何问题。我在配置 Zend 框架时使用 XAMPP。
XAMPP 正在 port 8081 上运行,因为 80 被某些 Windows 进程占用,我需要使用虚拟主机,我在 C:/xampp/apache/config/extra/httpd-vhosts.config 中使用以下代码进行配置(或 C:/xampp/apache/conf/extra/httpd-vhosts.conf 在较新的版本中)。
<VirtualHost *:80>
ServerName comm-app.local
DocumentRoot "C:/xampp/htdocs/CommunicationApp/public"
SetEnv APPLICATION_ENV "development"
<Directory "C:/xampp/htdocs/CommunicationApp/public"
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
并使用127.0.0.1 comm-app.local 更新主机文件并尝试重新启动apache,但它显示错误。
15:03:01 [Apache] Error: Apache shutdown unexpectedly.
15:03:01 [Apache] This may be due to a blocked port, missing dependencies,
15:03:01 [Apache] improper privileges, a crash, or a shutdown by another method.
15:03:01 [Apache] Press the Logs button to view error logs and check
15:03:01 [Apache] the Windows Event Viewer for more clues
15:03:01 [Apache] If you need more help, copy and post this
15:03:01 [Apache] entire log window on the forums
【问题讨论】:
-
VirtualHost *:80 不应该是 VirtualHost *:8081 如果那是运行 Apache 的地方
-
占用80端口的windows进程可能是Skype。
标签: php apache zend-framework xampp virtualhost