我最近升级到最新版本的PHP(在此之前一切正常)并且在/etc/apache2/sites-enabled/local.events下有以下虚拟主机配置文件
<VirtualHost *:80>
ServerName events.local
DocumentRoot "/home/john/development"
<Directory "/home/john/development">
AllowOverride All
</Directory>
</VirtualHost>
然而,当我转到http://local.event/时,它运行位于/var/www/index.html的文件,而不是在/ home / john / development下运行我的网站。我如何解决这个问题以及为什么在我仅使用以下代码更新PHP之后就是这种情况:
sudo add-apt-repository ppa:ondrej/php5
sudo apt-get update
sudo apt-get upgrade
答案 0 :(得分:0)
<VirtualHost *:80> ServerName events.local ServerAleas events.local DocumentRoot "/home/john/development"
<Directory "/home/john/development">
AllowOverride All
</Directory>
</VirtualHost>
2. Need add in /etc/hosts line (127.0.0.1 events.local)