apache服务器出现You don’t have permission to access / on this server. 问题的解决办法
今天章郎虫在配置apache服务器的时候在web目录里面放了很多网站的目录,我的想法是在浏览器里面输入网址后可以列出目录。可是一切设置完成,在浏览器中输入本地地址后,出现“You don’t have permission to access / on this server.”的 提示。在网上胡乱找了下后,总算是解决了问题。
在apache的安装目录找到“/conf/httpd.conf”文件,这里定义了默认对网站根的访问权限。
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the “default” to be a very restrictive set of
# features.
#
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the “default” to be a very restrictive set of
# features.
#
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
改成下面后问题可以解决。
<Directory />
Options Indexes FollowSymLinks
AllowOverride None
</Directory>
Options Indexes FollowSymLinks
AllowOverride None
</Directory>