我看到两个错误:
<VirtualHost *:80> -> Fix to :8081, your POrt the server runs on ServerName comm-app.local documentRoot "C:/xampp/htdocs/CommunicationApp/public" SetEnv APPLICATION_ENV "development" <Directory "C:/xampp/htdocs/CommunicationApp/public" -> This is probably why it crashes, missing > DirectoryIndex index.php AllowOverride All Order allow,deny Allow from all </Directory> -> MIssing close container: </VirtualHost>
固定版本:
<VirtualHost *:8081> 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>
一件事要提到:
您可以随时尝试运行命令:
service apache2 configtest
这将告诉您什么时候配置格式错误,甚至可以告诉您问题出在哪里。
此外,它还有助于避免LIVE系统不可用:
service apache2 restart
将关闭,然后无法启动,此配置测试您事先知道“糟糕,我做错了什么,我应该先解决此问题”,但是apache本身仍在使用旧配置运行。:)



