参考各种wamp教程后外网仍然不能访问服务器,很是头疼

网上好多wampserver配置都比较久远,最新版本3.1.0的很少,首先打开httpd.conf文件(这部分较简略,详细可以参考其他wamp配置教程)

更改DocumentRoot 。。。和<Directory " 。。。">后,由于wampserver3.0.6的apache版本为2.4.23,所以允许外网访问要在Directory 中的加上:Require all granted,

之后发现还是访问不了:


原来在apache 2.4.27中有这段代码:

# Virtual hosts
Include conf/extra/httpd-vhosts.conf

这样导致httpd.conf中的Require all granted不起作用,所以在apache根目录\conf \ extra中找到httpd-vhosts.conf文件,在Directory 中添加:Require all granted,这样就可以外网访问了!

<VirtualHost *:80>
  ServerName www.saneb.cn
  DocumentRoot "c:/sitefolder"
  <Directory "c:/sitefolder/">
    Options +Indexes +Includes +FollowSymLinks +MultiViews
    AllowOverride All
    Require local
    Require all granted
  </Directory>
</VirtualHost>

You don't have permission to access / on this server. wampserver3.1.0配置外网访问的问题的更多相关文章

  1. phpStudy出现You don't have permission to access / on this server.

    原本用的 php 是<5.5.38版本的>,但是项目最低要求是<5.6>,所以就选择切换了版本,但是用原来的域名访问一直出现:You don't have permission ...

  2. Forbidden You don't have permission to access / on this server PHP

    在新安装的谷歌游览器里,打不了PHP网站了,错误显示: Forbidden You don't have permission to access / on this server. 原因还是配置权限 ...

  3. wamp出现You don’t have permission to access/on this server提示的解决方法

    本地搭建wamp 输入http://127.0.0.1访问正常,当输入http://localhost/ apache出现You don't have permission to access/on ...

  4. yii安装 /You don't have permission to access on this server

    在安装yii的时候 ,当打开了init.bat进行配置的时候小黑本弹出了个小黑框立刻就关闭了,  进入cmd模式再打开init.bat就出现了"You don't have permissi ...

  5. CentOS出错You don't have permission to access on this server

    之前配置phpmyadmin的时候,在浏览器上输入http://192.168.8.250/phpmyadmin/ 也遇到了You don't have permission to access on ...

  6. wampserver You don't have permission to access / on this server. 解决 方法(转,正好碰到这样的事情了就转下来)

    最近在安装最近版wampserver 2.2 d时发现安装好后启动服务器,访问localhost显示You don't have permission to access / on this serv ...

  7. Forbidden You don't have permission to access / on this server. You don't have permission to access /phpmyadmin/ on this server. 解决办法

    Forbidden  You don't have permission to access / on this server.   解决办法 打开 httpd.conf 文件, 将 #   onli ...

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

    今天在测试一个php程序的时候,发现这个问题: Forbidden You don't have permission to access / on this server. 开始的时候我是用http ...

  9. 新安装 wampserver 出现 You don't have permission to access / on this server. 或者访问数据库出现You don't have permission to access /phpmyadmin/ on this server.(解决方法)转

    本地搭建wamp,输入http://127.0.0.1访问正常,当输入http://localhost/,apache出现You don't have permission to access/on ...

随机推荐

  1. mysql中binglog底层原理分析

    binglog 是一个二进制的日志文件,会记录mysql的数据更新或潜在个跟新 (delete from table where id =xxx) 主从复制就是依靠binglog master -sl ...

  2. 5.AOP配置与应用(annotation的方式)

    步骤: a)在beans.xml文件中加上对应的xsd文件 spring-aop.xsd b)加上<aop:aspectj-autoproxy>,使用aspectj来完成aop <! ...

  3. sql临时表 通过临时表循环处理数据

    -- 创建临时表 IF OBJECT_ID('tempdb.dbo.#temprecord','U') IS NOT NULL DROP TABLE dbo.#temprecord; GO SELEC ...

  4. VUE【四、组件】

    今天周五了,这周由于开始了健身计划,晚上几乎没精力继续看书了,早上也很困..可能刚开始不适应,适应了就好了..只能挤挤时间抓紧看 原计划这周看完vue再把springmvc看了的,又只看了部分vue, ...

  5. 微信小程序开发(七)获取手机网络类型

    // succ.wxml <view>手机网络状态:{{netWorkType}}</view> // succ.js var app = getApp() Page({ da ...

  6. 10_Hive自定义函数UDF

    Hive官方的UDF手册地址是:https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF 1.使用内置函数的快捷方法: 创 ...

  7. IDEA intellij 引用jar包方法

    以下为方法之一. 1. 点击左上角文件 - Project Structure 2. 依次按照下图点击 3. 选择需要导入的jar包,点击ok

  8. SpringMVC——问题汇总

    1.html页面ajax请求/login.后台报: Request method 'GET' not supported 原因: 后台请求使用了method = POST,但是url请求没有formd ...

  9. 【线段树 dp】8.6集合

    线段树维护dp 题目大意 给定初始大小为 $N$ 的正整数集合.定义两个数$x$和$y$建立联系的的代价为 $|x-y|$.我们定义整数集合的代价为:将每个整数都与至少一个另外的整数建立联系之后,所有 ...

  10. C# 数组(5) 持续更新

    同一类型和不同类型的多个对象 使用同一类型的多个对象,使用集合和数组. 使用不同类型的多个对象,使用Tuple(元组). 初始化数组 ]; myArray 存放在栈中,而 myArray 的内容 放在 ...