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

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

今天老大让在xp下搭建一个FTP服务器,一波三折,最后终于在老大的帮助下搞定了。。。

其中通过ip访问的时候 提示 Forbidden You don't have permission to access / on this server.

找到一个解决方法,特此记录

 

php的配置文件httpd.conf。

在原有的位置文件中找到配置节

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

 

修改成

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
#    Deny from all
    Allow from all

#允许所有访问
    Satisfy all
</Directory>

 

 

还有

 

<Directory "D:/Wamp5/www">

    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride all

    #
    # Controls who can get stuff from this server.
    #
#   onlineoffline tag - don't remove
    Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1

</Directory>

 

修改成

 

<Directory "D:/Wamp5/www">

    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride all

    #
    # Controls who can get stuff from this server.
    #
#   onlineoffline tag - don't remove
    Order Deny,Allow
#    Deny from all

#  Allow from 127.0.0.1
    Allow from all

</Directory>

 

然后保存,重启服务,在访问就解决了这个问题。

时间: 2024-11-18 13:08:35

PHP错误:Forbidden You don&#39;t have permission to access / on this server.的相关文章

Forbidden You don&amp;#39;t have permission to access / on this server.

原文:Forbidden You don't have permission to access / on this server.Forbidden You don't have permission to access / on this server. 当出现此问题的时候,记得修改httpd.conf. 在原有的位置文件中找到配置节 <Directory />     Options FollowSymLinks     AllowOverride None     Order deny

PHP错误:Forbidden You don&#039;t have permission to access / on this server

 今天在测试一个php程序的时候,发现这个问题: Forbidden You don't have permission to access / on this server.   开始的时候我是用http://localhost/test.php进行的测试,没有发现问题,后来要在内网测试一下就要用IP地址进行那个访问了,如:http://10.10.50.195/test.php,就出现了这个问题. 后来咨询了一下朋友(php高手),说修改一下php的配置文件httpd.conf. 在原有的位

You don&amp;#39;t have permission to access /nagios/ on this server

  You don't have permission to access /nagios/ on this server  解决: chmod 777 nagios http://IP/nagios 出现欢迎界面  1.  其实这种错误就是提示你没有权限访问nagios这项服务.造成这种报错的原因有多种,可能是文件权限你没有改成777,也可能是你httpd.conf这个配置文件有问题等,但还有一个问题是你想不到的.就是系统环境,注意访问nagios页面,这个nagios页面需要php支持.如果

挂载NFS出现access denied by server while mounting…错误

之前本站有介绍过Ubuntu中如何安装和挂载使用NFS的文章,不清楚的可以再去看看.现在又有需要,然后我就照着做了一遍.不过非常不幸,这次不怎么顺利.接下来把过程记录下.安装非常简单,没什么问题.按照之前文章,先在服务端安装nfs-kernel-server,然后创建目录,修改/etc/exports配置文件,添加目录为可挂载,启动nfs程序.不过这次创建目录的时候我没有使用nobody用户,而是指定了某一个用户对该目录有可读写权限.该用户已指定uid.gid,主要目的是多个用户使用nfs-se

erlang otp-erlang 服务器端编程 错误提示 variable &amp;amp;#39;State&amp;amp;#39; is unbound

问题描述 erlang 服务器端编程 错误提示 variable 'State' is unbound -module(gen_server_template). %% gen_server_template -behaviour(gen_server). -export([start_link/0]). %% gen_server callbacks -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/

win2003环境下PHP错误提示:Can&amp;#39;t create TCP/IP socket (10106)

本人在登陆phpmyadmin时,也遭遇了Can't create TCP/IP socket (10106)的错误,在网站查找了一套堆资料后,还是无果,最后,在自己的排查下,发现了问题所在. 网站的环境是win2003+PHP5,问题出现之前,没有做过任何的修改.突然间访问PHP网站时出现错误提示:Warning: Cannot modify header information - headers already sent by.... 怀疑是不是PHP或MYSQL的问题,通过PHPINFO

qt 运行时的错误,g_main_context_push_thread_default&amp;amp;#39;

问题描述 qt 运行时的错误,g_main_context_push_thread_default' undefined reference to g_main_context_push_thread_default' undefined reference tog_main_context_pop_thread_default' 解决方案 hi, undefined reference to XXX 说明没有找到/链接到包含该函数(XXX)的库. 而具体的 g_main_context_pus

Visual Studio 2012 编译错误【error C4996: &amp;#39;scanf&amp;#39;: This function or variable may be unsafe. 】的解决方案

#include "stdafx.h" #include "stdio.h" void main() { int n,x,y; printf("请输入n和x的值\n"); scanf("%d %d",&n,&x); y=n+x; printf("最后的结果是:%d\n",y); } 编译显示有错: error C4996: 'scanf': This function or variable

Visual Studio 2012 Update3 安装失败错误“正在关闭管道&amp;#39;

问题描述: Visual Studio 2012 update3 安装失败错误" 正在关闭管道' 环境: Windows 7 SP1(x86和x64) Windows 8(x86和x64) Windows Server 2008 R2(64位) Windows Server 2012(64位) 症状: Visual Studio 2012 update3 安装失败错误' 正在关闭管道'为几个组成部分,然后最终用户取消安装"(我知道你并没有取消安装!). 分辨率: 为了解决这个问题,你首