【发布时间】:2014-01-27 00:01:18
【问题描述】:
我最近清理了我的硬盘驱动器并重新安装了 Apache,我在其他网站上看到过这个,但没有一个解决方案对我有用,当我做根网站域时,Apache 一直显示“它有效”(http://wrks.tk/ )。它不显示其中的文件夹和文件。
另一个问题是,当我尝试加载我的网站文件夹 (http://wrks.tk/DNS) 时,它会出现 404 错误。
在我的 httpd-vhosts.conf 中:
<VirtualHost *:80>
DocumentRoot "/Library/WebServer/Documents"
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/Workarea"
ServerName wrks.tk
ErrorLog "/Logs/Workarea/wrks-err"
CustomLog "/Logs/Workarea/wrks-acc" common
<Directory "/Workarea">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
而且一切的位置都是正确的。
EDIT 1
好的,我在/Library/WebServer/Documents 中找到了 index.html 文件,其中包含“It works!”。但这对我帮助不大。
EDIT 2
我将DirectoryIndex Home.php 添加到我的虚拟主机。然后在我的网站上添加了Home.php,并在其中添加了一些东西,但我仍然得到“它可以工作!”。
EDIT 3
我注意到我什至无法编辑文件名,因此我将文件夹重命名为其他名称,但没有用。我也尝试制作一个新文件夹。那也没用。
【问题讨论】:
标签: html apache virtualhost markup