前几天装一个phpStudy 集成环境,打开测试页面的时候突然出现如下错误:

有一些小总结。

一些小的开发测试在本地开发的话,直接localhost/file  就可以,  如果涉及到大的开发环境,一般是设定虚拟站点直接连接到开发的主目录

Forbidden

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

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

1.  调试phpStudy

其他选项菜单 ---> 站点域名设置

2. \phpStudy\Apache\conf\vhosts.conf

<VirtualHost _default_:80>
   DocumentRoot "D:\bangong\phpStudy\WWW\wd\web"    直接指到开发环境的主目录
   <Directory "D:\bangong\phpStudy\WWW\wd\web">
    Options +Indexes +FollowSymLinks +ExecCGI
    AllowOverride All
    Order allow,deny
    Allow from all
    Require all granted
   </Directory>
</VirtualHost>

2.

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

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

3.

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

you don't have permission to access forbidden的更多相关文章

  1. Forbidden You don't have permission to access / on this server PHP

    在新安装的谷歌游览器里,打不了PHP网站了,错误显示: Forbidden You don't have permission to access / on this server. 原因还是配置权限 ...

  2. Forbidden You don't have permission to access / on this server. You don't have permission to access /phpmyadmin/ on this server. 解决办法

    Forbidden  You don't have permission to access / on this server.   解决办法 打开 httpd.conf 文件, 将 #   onli ...

  3. WAMP error: Forbidden You don't have permission to access /{you_app_name} on this server

    Forbidden You don't have permission to access /{you_app_name}on this server. 需要修改两处: wamp\bin\apache ...

  4. PHP错误:Forbidden You don't have permission to access / on this server.

    今天在测试一个php程序的时候,发现这个问题: Forbidden You don't have permission to access / on this server. 开始的时候我是用http ...

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

    原文:Forbidden You don't have permission to access / on this server. Forbidden You don't have permissi ...

  6. XAMPP Access forbidden! Error 403,You don't have permission to access the requested directory

    xampp 无论在window 还是在 Mac 如出现以下错误的:通常的解决方式: 具体配置教程可以任意查相关资料既可,(配置子站子大致流程如:开启httpd.conf的inc...httpd-vho ...

  7. 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的版本问 ...

  8. wamp网站Forbidden You don't have permission to access

    Forbidden You don't have permission to access   问题原因:apache的2.4的版本中 Require all denied 应该变成Require a ...

  9. Forbidden You don't have permission to access XXX on this server

    Forbidden You don't have permission to access / on this server. 找到 apache 配置文件 httpd.conf 把里面的 <D ...

随机推荐

  1. .NET开源工作流RoadFlow-表单设计-子表

    子表即明细表 从表:与主表对应在子表. 从表主键:从表的主键. 主表字段:主表中与从来关联的字段,一般为主表的主键. 与主表关联字段:从表中与主表关联的字段. 选择之后即可在下面从表字段列表中设置每个 ...

  2. Android 获取系统时间和网络时间

    有些时候我们的应用中只能使用网络时间,而不能使用系统的时间,这是为了避免用户关闭了使用网络时间的功能后所产生的误差. 直接上代码. 1.清单文件中网络添加权限. <!-- 访问Internet资 ...

  3. Java NIO(三) Buffer

    Java NIO中的Buffer用于和NIO通道进行交互.如你所知,数据是从通道读入缓冲区,从缓冲区写入到通道中的. 缓冲区本质上是一块可以写入数据,然后可以从中读取数据的内存.这块内存被包装成NIO ...

  4. spark1.统计句子中特定内容

    val logFile = "./README.md" // Should be some file on your server. val conf = new SparkCon ...

  5. SQL Server 的 主键 解决方案 NEWID() , 自增ID

    在 SQL Server 表的主键有自增Id ,和  GUID. 1.  自增Id 优点:索引空间小,索引连续.在大量数据插入的时候性能有特别大的优势. 缺点:可移植性差,在数据迁移的时候. 2. G ...

  6. 【java开发系列】—— 嵌套类与内部类

    嵌套类与内部类在java中使用的很广泛,为了避免难以理解,这里用了几个小例子,说明它的用法. 嵌套类与内部类的结构如下图 静态嵌套类 静态嵌套类,是一种在类之外声明的嵌套类,由于是静态的,所以不经过初 ...

  7. Full scan vs index 执行计划的实验

    根据Oracle-L邮件列表里主题「 Full scan vs index 」的讨论而来. 1.测试环境创建 SYS@HEMESRHTDB2(1.206)> select * from v$ve ...

  8. C语言 条件编译(if )

    #include <stdio.h> #define NUM -1 int main(int argc, const char * argv[]) { #if NUM > 0 pri ...

  9. pthread的各种同步机制

    https://casatwy.com/pthreadde-ge-chong-tong-bu-ji-zhi.html pthread是POSIX标准的多线程库,UNIX.Linux上广泛使用,wind ...

  10. MySQL:数据库入门篇1

    1,什么是数据库?——存储数据的仓库 数据库技术是计算机应用领域中非常重要的技术,它产生于20世纪60年代末,是数据管理的最新技术,也是软件技术的一个重要分支. 简单的说,数据库就是一个存放数据的仓库 ...