php-IIS和WampServer 冲突问题
原创
©著作权归作者所有:来自51CTO博客作者原小明呢的原创作品,请联系作者获取转载授权,否则将追究法律责任
1.问题
Forbidden
You don't have permission to access / on this server.
2.解决方案
右击红色图标>localhost,我们会发现跳转的网页是,这个是IIS的网页,这就说明WampSever 与IIS端口冲突 了
我们对apache进行端口配置:左击红色图标>Apache>httpd.conf ,打开此文件,我们会看到这里:第二三行 listen后面的80表示服务器监听的端口;改成其他端口 比如8081;
3)但是当我们不在地址栏上进入,而是左击图标>Localhost 会发现仍然进入IIS页面,这是因为我们只改变了 apache内部的监听端口,并没有改变与之相关联的按钮配置文件,进入Wamp Server 的安装目录,打开 wampmanager.tpl :修改 localhost 为 localhost:8081 ,搜索localhost :
4)继续修改 apache 的httped.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>
然后保存,重启服务,在访问就解决了这个问题。