日期:2014-05-17  浏览次数:20742 次

apache中不能访问页面的问题
今天郁闷了。
在安装好的apache(/usr/local/apache2/htdocs)中放了一个目录(website),该目录下有三个静态页面,可是当我访问:localhost/website/index.html的时候竟然出现
403Forbidden错误
    you don't hava permission to access /...... on this server.

我勒个去?

于是我访问apache中的index.html页面:访问localhost/index.html 是可以的
于是我写了个text.html在 /usr/local/apache2/htdocs中目录下:访问localhost/index.html 也是可以的

为什么我创了个目录就不能访问了????????????????????

------解决方案--------------------
找到  httpd.conf


找到下面这一段:

<Directory />

    Options FollowSymLinks

    AllowOverride None

    Order deny,allow

    deny from all

</Directory>

看到了没?

把”deny from all”改成”allow fromall’。

<Directory />

    Options FollowSymLinks

    AllowOverride None

    Order deny,allow

    allow from all

</Directory>
这样你就可以访问了,不然你是没有权限的