我确信这个问题已经被问过很多次了,但是我没有遇到任何问题。我在配置Zend框架的地方使用XAMPP。
XAMPP在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>
并使用来更新hosts文件,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