首页 > 编程语言 >php-IIS和WampServer 冲突问题

php-IIS和WampServer 冲突问题

时间:2023-02-23 10:32:20浏览次数:33  
标签:None IIS Deny AllowOverride WampServer FollowSymLinks Allow php Options


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 :

php-IIS和WampServer 冲突问题_php

   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>



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





标签:None,IIS,Deny,AllowOverride,WampServer,FollowSymLinks,Allow,php,Options
From: https://blog.51cto.com/u_15976424/6080623

相关文章

  • phpstorm go py 30天无线试用
    1.关闭软件(建议先导出设置配置,操作会重置配置)2.删除文件(一般AppData会被隐藏,需要通过查看选项里面打开查看隐藏文件,不懂自行百度)删除目录 C:\Users\用户名\AppData\Roam......
  • php网页文章分类超链接
    在原来代码基础上更改输出导航栏的代码更改后网页导航栏预览如下,但超链接为空,所以点击导航栏没反应用数据库查询zblog内的文章 查询某个文章分类内的文章,要查询的文......
  • PHP使界面从静态变为动态
    1.首先确定数据库内的数据  2.使用代码,新建页面实现点击跳转  3.这种方法繁琐且不方便,可以使用$_GET这个变量  4.出现界面如图所示 ......
  • php调试配置
    错误信息输出错误日志nginx把对php的请求发给php-fpmfastcgi进程来处理,默认的php-fpm只会输出php-fpm的错误信息,在php-fpm的errorslog里也看不到php的errorlog。原因是......
  • php7 No package 'sqlite3' found
    源码安装php7.4的时候报了这个错,说是缺少sqlite3,可以试着:yuminstall sqlite-devel但是试了以后还是报错,是因为版本过低。于是,去它的官网下载安装包,解压,安装,make&&ma......
  • 在PHP和JavaScript中设置Cookie、会话存储(SessionStorage)和本地存储(LocalStorage)
    A.Cookie介绍Cookie:Cookie常用于识别用户,它是服务器留在用户计算机中的小文件(大小限制在4KB),每当相同的计算机通过浏览器请求页面时,它会同时发送Cookie,即Cookie是随HTTP......
  • 记一次完整的PHP代码审计——yccms v3.4审计
    一、环境搭建与使用工具(一)环境搭建打开源码查看安装要求 PHP5.4+,Mysql5.0.*,直接使用phpstudy配置即可查看源码目录结构,发现是mvc模式的,那么我们重点关注的就......
  • PHP unset浅谈
    一定义unset() 函数用于销毁给定的变量。起初我以为销毁了变量,那内存肯定就释放了,实际上并不是如此。二unset整个数组<?php$arr=[];echo(date('Y-m-dH:i:s......
  • PHP 进行支付宝开发中return_url和notify_url的区别分析
    在支付宝处理业务中return_url,notify_url是返回些什么状态呢,我们要根据它来做一些处理就必须了解return_url,notify_url的区别,下面我就来给大家介绍;一、问题描述:我在......
  • PHP 日志专题
    PHP堆栈跟踪(phpstacktrace)PHPmessage:PHPStacktrace:PHPmessage:PHP1.{main}()/home/www/ford4s/public/index.php:0PHPmessage:PHP2.AMAI\Applicat......