前几天装一个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. angular - webpack2 例子

    用一周多的时间做了一个简易的wap站 之前研究过webpack但是一直没用过,这次公司要做一个h5网站,正好拿来练练手,话说angular1x对移动端不是很友好,但主要是angular1x比较熟悉,上 ...

  2. 【Linux】 Linux编程规范&Linux 编程环境搭建

    一.通过Samba映射网络驱动器 菜单栏-计算机-映射网络驱动器 English 菜单栏-Home -Easy access-Map as drive 编辑代码使用 Windows 编译 运行程序在 ...

  3. Android性能优化之渲染篇

    下面是渲染篇章的学习笔记,部分内容和前面的性能优化典范有重合,欢迎大家一起学习交流! 1)Why Rendering Performance Matters 现在有不少App为了达到很华丽的视觉效果, ...

  4. 《ArcGIS Runtime SDK for Android开发笔记》

    开发笔记之基础教程 ArcGIS Runtime SDK for Android 各版本下载地址 <ArcGIS Runtime SDK for Android开发笔记>——(1).And ...

  5. dpkg 打包root权限app

    dpkg 安装Macports 下载对应系统的Macports安装时间会比较久,安装完毕后放在了/opt/local/bin 目录下 安装dpkg 打开终端,输入 sudo port -f insta ...

  6. keras 保存训练的最佳模型

    转自:https://anifacc.github.io/deeplearning/machinelearning/python/2017/08/30/dlwp-ch14-keep-best-mode ...

  7. sql server 某列去重

    例如:某个表中,插入了两条除id外其他字段都一样的数据,但是查询的时候只想查到一条. select * from 表名 where 主键 in ( select max(主键) from 表名 gro ...

  8. Selenium2学习(七)-- 定位一组元素find_elements

    前言 前面的几篇都是讲如何定位一个元素,有时候一个页面上有多个对象需要操作,如果一个个去定位的话,比较繁琐,这时候就可以定位一组对象. webdriver 提供了定位一组元素的方法,跟前面八种定位方式 ...

  9. March 25 2017 Week 12 Saturday

    Better master one than engage with ten. 会十事不如精一事. My colleagues think I have known a lot of things, ...

  10. SQA和测试规程

    SQA *:first-child { margin-top: 0 !important; } body>*:last-child { margin-bottom: 0 !important; ...