前几天装一个linux 企业版5.0安装了apache,打开测试页面的时候出现如下错误:

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”,所以提示此错误

解决问题 “You don't have permission to access /index.html on this server.”的更多相关文章

  1. 错误403,You don't have permission to access /index.html on this server.

    再更改apache工程路径时候,按照许多教程改了httpd.conf文件,还是不行,问题依旧存在 解决方式,你的个人文件夹的权限还没改好,看一下自己的个人文件夹的权限,是否可以读写

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

    <Directory /> #AllowOverride none #Require all denied</Directory>

  3. wampserver apache 403无权限访问 You don't have permission to access /index.html on this server

    今天接到要求 需要配置一下https 折腾好久 最后好还遇到了权限不够的问题 最后解决方案如下 我这边补充一下我的方法 我的apache是 2.4.23 版本 是由 wampserver集成的 在 h ...

  4. apache 提示You don't have permission to access /test.php on this server.怎样解决

    原文:apache 提示You don't have permission to access /test.php on this server.怎样解决 关键字: Apache   403  For ...

  5. wordpress迁移后登陆时出现Forbidden You don’t have permission to access /wp-login.php on this server

    之前在vps上,最近迁移到了php虚拟主机上,迁移后发现无法登陆后台出现403:Forbidden You don’t have permission to access /wp-login.php ...

  6. apache 提示You don't have permission to access /test.php on this server.怎样解决

    把denty改成allow httpd.conf文件中. <Directory "cgi-bin"> AllowOverride None Options None O ...

  7. 301重定向将不带www的域名跳转到www的域名,403 Forbidden You don’t have permission to access the URL on this server

    博客搬迁,给你带来的不便,敬请谅解! http://www.suanliutudousi.com/2017/11/14/301%e9%87%8d%e5%ae%9a%e5%90%91%e5%b0%86% ...

  8. php多站点配置以及Forbidden You don't have permission to access / on this server问题解决

    php多站点配置以及Forbidden You don't have permission to access / on this server问题解决 一.总结 一句话总结:我的问题是php的版本问 ...

  9. you don't have permission to access forbidden

    前几天装一个phpStudy 集成环境,打开测试页面的时候突然出现如下错误: 有一些小总结. 一些小的开发测试在本地开发的话,直接localhost/file  就可以,  如果涉及到大的开发环境,一 ...

随机推荐

  1. 重新定位svn地址的方法(windows和linux),svn switch(sw)的帮助信息

    今天公司的路由器出现问题,服务器的IP地址也跟着变了,但是原来的svn已经设置好了,现在需要更换地址 查询原地址的方法: root@jack-desktop:codes# svn info 路径: . ...

  2. for语句的用法

    #!/bin/bashfor i in 1 2 3 4 5 6do echo $idone 看文件 #!/bin/bashdir=$(ls /etc) for i in $dirdo echo $id ...

  3. MongoDB项目中常用方法

    使用MongoDB连接池MongoOptions来进行连接 以及相关方法的调用 //获得驱动地址(这里的驱动 写入了配置文件中) String serverAddressStr = Configure ...

  4. ubuntu下安装jdk(rpm版)错误: 找不到或无法加载主类 解决方法

    1.官网下载jdk,linux64位,rpm格式的. 2.提取下载的文件,提取到一个目录下,我的是提取到了usr目录下了 3.终端输入:sudo gedit ~/.bashrc 会打开一个文本,在文本 ...

  5. 解决dedev5.7更新出现include\userlogin.class.php on line 21的办法

    第一种情况解决办法:   在dede\templets文件夹 找到 index_body.htm  文件 把这些注释掉. $(function() {    $.get("index_tes ...

  6. java获取本机IP地址和MAC地址的方法

    // 获取ip地址 public static String getIpAddress() { try { Enumeration<NetworkInterface> allNetInte ...

  7. [ActionScript 3.0] AS3 获取某年某月的天数(Get number of days in a month)

    function getNumberOfDays($year:int, $month:int):int { var month:Date = new Date($year, $month + 1, 0 ...

  8. xargs -r

    -r  no-run-if-empty xargs大多数 Linux 命令都会产生输出:文件列表.字符串列表等.但如果要使用其他某个命令并将前一个命令的输出作为参数该怎么办?例如,file 命令显示文 ...

  9. sql执行返回值存储

    List<Map> list = SqlRunner.queryMapList(sql); if(list != null && !list.isEmpty()){ Has ...

  10. SQL 获取各表记录数的最快方法

    select distinct o.name,i.rows from sysobjects o,sysindexes  i where o.id=i.id and o.Xtype= 'U' and i ...