【发布时间】:2014-11-28 01:14:53
【问题描述】:
我最近在我的 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 admin@url.co
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 ),还是有其他可能导致此问题的内容?
【问题讨论】:
标签: apache virtualhost ubuntu-13.10