我最近在vps上运行了一个更新,在Ubuntu 13.10上将我的apache从2.2更新到了2.4.6。
更新后,我只会得到“它有效”的默认apache登陆页面。
我相当确定这是由于新的虚拟主机文件要求引起的,因此我尝试将.conf
扩展名添加到我的虚拟主机文件中,还添加了:
<Directory "/home/username/public/testapp.com/public/">
Options Indexes FollowSymLinks Includes
AllowOverride All
Require all granted
</Directory>
到文件,然后使用a2ensite重新启用它们并重新加载apache2。经过这些尝试,我一无所获,然后删除了所有已启用的站点,然后重新开始..放置一个基本站点/home/username/public/url.co/
并创建一个新的虚拟主机文件:
<VirtualHost *:80>
# Admin email, Server Name (domain name), and any aliases
ServerAdmin [email protected]
ServerName url.co
ServerAlias www.url.co
# Index file and Document Root (where the public files are located)
DirectoryIndex index.html index.php
DocumentRoot /home/username/public/url.co/public/
# Log file locations
LogLevel warn
ErrorLog /home/username/public/url.co/log/error.log
CustomLog /home/username/public/url.co/log/access.log combined
<Directory /home/username/public/url.co/public/>
Options Indexes FollowSymLinks Includes
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
这仍然给了我“有效”页面。我是否缺少此文件的明显错误(其正确命名为url.co.conf),或者是否有其他原因可能导致此问题?
我有同样的问题!我通过DirectoryIndex index.html index.php
在conf文件中添加:来解决它
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句