+ -
当前位置:首页 → 问答吧 → 设置网站目录403的问题

设置网站目录403的问题

时间:2010-10-13

来源:互联网

rt.. 这样一个问题, 如果把我网站放到 /usr/local/web 下的话访问就会出现403错误,如果我放到/home/web下就没问题。
如果我想要把网站放到/usr/local下的话应该怎么修改?谢谢。

目录权限和apache陪配文件应该是都没问题, 是不是apache对一些路径有限制?要如何修改?

作者: Qlin   发布时间: 2010-10-13

HTML code

apache中出现HTTP 错误 403 - 禁止访问:

默认路径是 /usr/local/apache/htdocs 我想修改成/var/www/html,需要修改三个地方

DocumentRoot "/usr/local/apache/htdocs"   
#
# 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(改为Allow from all)
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/usr/local/apache/htdocs">


作者: yhtapmys   发布时间: 2010-10-13