今天在测试一个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。
在原有的位置文件中找到配置节
<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>
然后保存,重启服务,在访问就解决了这个问题。转自:http://www.3lian.com/edu/2013/05-30/72198.html
相关推荐
Apache服务器在运行过程中可能会遇到各种错误,其中"403 Forbidden"是一个常见的错误,提示用户没有权限访问指定的资源。这个错误通常出现在尝试访问某个网页或文件时,服务器返回的状态码为403,表示服务器理解了...
键字: Apache 403 Forbidden 系统配置: 操作系统:Red Hat Linux 6.2 Web服务器:Apache 3.1.1+jakarta-tomcat 3.1.1 数据库服务器:oracle 8i Apache服务器是目前应用... You don’t have permission to access
一直在用APMServ5.2.6,mysql好办,可以用mariadb代替进行升级,但php...You don't have permission to access / on this server. Apache/2.4.9 (Win32) PHP/5.5.12 Server at www.sitename.com Port 80 一、在国内网
最近在工作中需要使用PHP访问Redis,从https://github.com/phpredis/phpredis下载了phpredis,并且按照官方的说明进行了安装 phpize ./configure [--enable-redis-igbinary] make && make install 但是在重启...
查看/var/log/nginx/error.log日志显示:xxx 403 forbidden (13: Permission denied)错误。我勒个去~ 引起nginx 403 forbidden通常是三种情况:一是缺少索引文件,二是权限问题,三是SELinux状态。 一、缺少index....
You need to get a newer Subversion client, or to downgrade this working copy. 该错误提示的原因是安装了多个版本的 SVN 客户端,且各个客户端的版本不一致。解决方法是将本机安装的所有的 SVN 客户端都更新到...
主要介绍了wamp安装后自定义配置的方法,主要是遇到Forbidden you dont hava permission to access * on the server错误提示的解决方法,需要的朋友可以参考下
</b>...]</p> <p>> <span>SOME PAGES ON THIS SERVER THAT YOU DO HAVE PERMISSION TO ACCESS</span>: [如果您是内部人员,请联系技术获取访问权限!]</p> <p>> <span>HAVE A NICE DAY SIR DragonersLi :-)</span>祝...
echo 'You don\'t have permission to access / on this server.'; echo '<P>'; echo 'Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.'; ...
3. **错误信息:Server sent unexpected return value (403 Forbidden)** 这意味着用户没有足够的权限访问资源。应联系管理员为用户提供必要的访问权限。 4. **错误信息:200 OK (http://www.moon.ossxp.com)** ...
当你尝试通过`systemctl start nginx.service`启动Nginx服务时,如果遇到`nginx: [emerg] bind() to 0.0.0.0:**** failed (13: Permission denied)`的错误,这通常意味着Nginx没有足够的权限绑定到指定的端口。...
具体来说,“403.14 - Forbidden”错误通常发生在以下几种情况: 1. **Web服务器配置问题**:例如,应用程序池配置不正确、身份验证方式设置不当等。 2. **文件权限问题**:如果应用程序文件或文件夹缺少必要的读取...
Bad request 错误请求 403 - Forbidden 禁止 500 - Internal Server Error 内部服务器错误 404 - Wrong page 找不到页面 Then, all you need to do is to create a file to display when the error ...
1、checkout时,提示:URL svn://IP/svntest doesn't exist… 奇怪,怎么会提示库不存在呢?肯定是哪里配置问题。后来尝试了半天,也在网上搜索了很久,终于发现问题所在。 如果你的svn库的路径为:/home/svn/...
中,有这样两个选项:allow_url_fopen =on(表示可以通过url打开远程文件),user_agent=”PHP”(表示通过哪种脚本访问网络,默认前面有个 ” ; ” 去掉即可。)重启服务器。 但是有些还是会有这个警告信息,想用完美...
The goal of this guide is to manage this complexity by describing in detail the dos and don'ts of writing C++ code. These rules exist to keep the code base manageable while still allowing coders to ...
当用户尝试访问我们不希望公开的页面时,我们通常会返回一个404 Not Found错误,提示用户请求的资源不存在。以下是一些实现这一功能的方法。 ### 1. 使用`header()`函数 `header()`函数是PHP中用于发送HTTP头部...