技术员联盟提供win764位系统下载,win10,win7,xp,装机纯净版,64位旗舰版,绿色软件,免费软件下载基地!

当前位置:主页 > 教程 > 服务器类 >

apache下403 Forbidden错误问题解决方法

来源:技术员联盟┆发布时间:2018-05-28 18:20┆点击:

  直接输入地址显示

  Forbidden

  You don't have permission to access /news/search_fdsafdsa on this server.

  httpd.conf,找到这么一段:

 代码如下      

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

然后试着把deny

 

  from all中的deny改成了allow,保存后重起了apache,然后再一测试我的网页,哈哈

  ps 403禁止访问 主要民apache中的 Order deny,allow deny影响到了,我们要解决它只需要把deny改成了allow就可以了,当然还有问题就是服务器权限问题。

  确保web文件夹下有index.html文件(或名为index而后缀为其他形式(如.jsp .php等)的文件) ,因为Apache默认以index.html为网站首页,如果没有这个文件就会出现上面的403错误。

 代码如下      

<IfModule dir_module>
       DirectoryIndex index.html
   </IfModule>

 

  改为(如你想用index.jsp):

 代码如下      

<IfModule dir_module>
       DirectoryIndex index.html index.jsp 
   </IfModule>

 

  如果需要浏览该文件夹下的内容,可以在前添加:

 代码如下      

Options Indexes

 

  就可以了。