今天配置新的apache后,apache提示:

403 Forbidden:You don't have permission to access / on this server.

 

查了下,把下面这段代码:

 

 

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>
 

 

改成

 

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    allow from all
</Directory>
 

 

    再次在浏览器里打开http://localhost,显示it works!

--把“Deny from all”改成“allow from all”

Apache 403有时候是文件权限问题:

修改文件夹安全属性
chcon -R -t httpd_user_content_t public_html/ 

相关文章:

看完了要说点啥么?