原文:wamp You don't have permission to access / on this server等问题的解决.

安装完wamp之后,安装网上的教程设置虚拟路径,出现了问题,同样的问题由不同的原因导致。希望对有些大意的人有帮助。

1、httpd.conf去掉Include conf/extra/httpd-vhosts.conf前面的#。

2、httpd.conf中添加Listen 相应的端口,我的是8080

3、在conf\extra下面的httpd-vhosts.conf文件中添加

<VirtualHost *:8080>

    DocumentRoot D:/wamp/www/aa

    ServerName localhost

    <Directory "d:/wamp/www/aa">

        Options Indexes FollowSymLinks

        Order allow,deny

        Allow from all

        AllowOverride All

    </Directory>

</VirtualHost>

4、然后调用localhost,就出现下面的错误:

Forbidden

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

(没有设置这一切时,localhost访问的没有问题的)

5、最后发现是没有删掉httpd-vhosts.conf文件中的这段代码导致的:

<VirtualHost *:80>

    ServerAdmin webmaster@dummy-host.example.com

    DocumentRoot "c:/Apache23/docs/dummy-host.example.com"

    ServerName dummy-host.example.com

    ServerAlias www.dummy-host.example.com

    ErrorLog "logs/dummy-host.example.com-error.log"

    CustomLog "logs/dummy-host.example.com-access.log" common

</VirtualHost>

删掉或者注释掉这段代码,再运行localhost就没有问题了。

6、localhost运行好使了,但运行localhost:8080却有新的问题:

Forbidden

You don't have permission to access /index.phpon this server.

7、然后也是找了很多,多是说什么allow from all等等的问题。但无论我怎么设置都是这个问题。

几经波折,发现把Options Indexes FollowSymLinks 后面添加上 ExecCGI就好使了。

<VirtualHost *:8080>

    DocumentRoot D:/wamp/www/aa

    ServerName localhost

    <Directory "d:/wamp/www/aa">

        Options Indexes FollowSymLinks ExecCGI

        Order allow,deny

        Allow from all

        AllowOverride All

    </Directory>

</VirtualHost>

wamp You don't have permission to access / on this server等问题的解决.的更多相关文章

  1. Linux Centos7 Apache 訪问 You don&#39;t have permission to access / on this server.

    折腾了非常久,今天才找到了最正确的答案.感言真不easy. 百度出来的99%都是採集的内容.全都是错误的. You don't have permission to access / on this ...

  2. 蛋疼的 403 Forbidden You don’t have permission to access / on this server.

    参考博文: a.http://www.linuxidc.com/Linux/2016-09/134827.htm 这个解释挺好 昨天配置新服务器:以为自己老手  就一步到位结果一直出现 403 For ...

  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. wamp出现You don’t have permission to access/on this server提示(转)

    转自http://blog.csdn.net/hong0220/article/details/40262729 ,转载方便以后查看. 今天搭建wamp集成环境,本来已经搭建好了,但是在访问local ...

  5. 【转】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 ...

  6. 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 ...

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

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

  8. 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 ...

  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. 【原创】leetCodeOj --- Binary Search Tree Iterator 解题报告

    时间挤挤总是有的 太久不做题,脑子都生锈了.来道水题练练手 题目地址: https://leetcode.com/problems/binary-search-tree-iterator/ 题目内容: ...

  2. android-adb通用

  3. T-SQL基础(4) - 子查询

    简单子查询select * from (select custid, companyname from Sales.Customers where country = N'USA') as USACu ...

  4. HttpLuaModule——翻译(Nginx API for Lua) (转)

    现在我已经将翻译的内容放到:http://wiki.nginx.org/HttpLuaModuleZh Nginx API for Lua Introduction 各种各样的*_by_lua和*_b ...

  5. 【转】c#实现字符串倒序的n种写法

    其中LINQ写法最为简洁 //string concatenation with for loop public string ReverseA(string text) {     char[] c ...

  6. Windows下效率必备软件

    AutoHotKey: 神器!神器!神器!当然也得看使用者咯(^__^) 嘻嘻…… Listary: 本地搜索神器,当然还有别的作用,More&More. Launchy : 快速启动安装的应 ...

  7. Spring.Net控制翻转、依赖注入、面向切面编程

    Spring.Net快速入门:控制翻转.依赖注入.面向切面编程 Spring.Net主要功能: 1.IoC:控制翻转(Inversion of Control)  理解成抽象工厂翻转控制:就是创建对象 ...

  8. C random C ++rand函数应用

    random函数不是ANSI C标准,不能在gcc,vc等编译器下编译通过.但在C语言中int random(num)能够这样使用,它返回的是0至num-1的一个随机数. 可改用C++下的rand函数 ...

  9. ZipDemo

    package swing.zip; import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt. ...

  10. C/C++综合測试题(三)

    又刷了一套题 这些题都是百度.阿里巴巴.腾讯.网易.新浪等公司的面试原题,有一定的难度.只是确实相当有水平,能够通过做题来查漏补缺. 1.补充以下函数代码: 假设两段内存重叠,用memcpy函数可能会 ...