wamp环境下You don't have permission to access / on this server.
程序员文章站
2022-03-15 22:32:11
...
一.问题描述
当我们把wamp环境在服务器上搭建好并成功启动的时候,本地环境localhost能成功访问,但通过域名访问却提示:“You don’t have permission to access / on this server.”
二.解决办法
step1:打开下图所示文件
用记事本修改文件信息为允许全部访问
ctrl+s保存即可
step2 完成第一步后发现仍然不能访问 需要进一步设置 找到如下图所示的文件
打开文件后修改两处:
第一处
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Allow from all
</Directory>
第二处
<Directory "${INSTALL_DIR}/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.4/mod/core.html#options
# for more information.
#
Options +Indexes +FollowSymLinks +Multiviews
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride all
#
# Controls who can get stuff from this server.
#
# onlineoffline tag - don't remove
Order Deny,allow
Allow from all
</Directory>
再次访问网页:
上一篇: php变量作用域的用法介绍(代码)
下一篇: MVC模式的PHP实现_PHP
推荐阅读
-
You don’t have permission to access /index.php on.
-
对于搭建网站中出现“You don't have permission to access this resource.”错误提示的解决思路
-
You don't have permission to access / on this server,Forbidden
-
CentOS7.0下安装Apache2.4.20版本,安装完成之后,报 You don't have permission to access / on this server.
-
wamp不能使用phpmyadmin,提示“You don't have permission to access /phpmyadmin/ on this server.”...
-
Apache启动后出现You don't have permission to access on this server的解决办法
-
PHP错误:Forbidden You don't have permission to access / on thi_PHP教程
-
apache出现You don't have permission to access / on thi_PHP教程
-
Apache出现 You don't have permission to access /phpmya
-
wamp不能使用phpmyadmin,提示“You don't have permission