zoukankan      html  css  js  c++  java
  • 解决问题 “You don't have permission to access /index.html on this server.”

    前几天装一个WAMP,打开测试页面的时候出现如下错误:

    Forbidden

    You don't have permission to access /index.html on this server.

    开始我以为我配置出错,花半天时间都没有搞定,今天终于搞定了.

    原因:index.html是用root用户建的文件,apache权限不够。

    解决方法:更改文件权限;chmod 755 index.html

    如果是WIN 2003下出现这个问题,请按以下方式解决

    打开apache配置文件httpd.conf,找到这么一段:
    <Directory />
         Options FollowSymLinks
         AllowOverride None
         Order deny,allow
         deny from all
         Satisfy all
    </Directory>
    然后试着把deny from all中的deny改成了allow,保存后重起了apache,然后再一测试我的网页,哈哈!居然问题就出在这,访问测试网站完全正常了。

    第二种方法

    是Apache  的配置文件httpd-vhosts.conf里,打开了扩展配置

    # Virtual hosts
    Include conf/extra/httpd-vhosts.conf

    前面的#去掉了,就 引入了扩展配置,而扩展配置 文件里又没配好相应 的权限“Allow from all”,所以提示此错误

  • 相关阅读:
    二分查找代码
    顺序查找代码
    js原生获取css属性
    前端使用nginx上传文件时,进度获取不对
    动态赋值poster,无法显示
    git 命令收藏
    promise笔记
    vscode自定义代码块
    vuex的初始化
    webstorm添加自定义代码块
  • 原文地址:https://www.cnblogs.com/fogwang/p/4769063.html
Copyright © 2011-2022 走看看