• 输入http://localhost/,apache出现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 this server.的提示,如何解决?

    • 找到httpd.conf,用记事本打开httpd.conf,
      1. <Directory />
      2.     Options FollowSymLinks
      3.     AllowOverride None
      4.     Order deny,allow
      5.     Deny from all
      6. </Directory>
      7. 将这里改成:
      8. <Directory />
      9.     Options FollowSymLinks
      10.     AllowOverride None
      11.     Order deny,allow
      12.     Allow from all
      13. </Directory>
    • 还有一处将下面
    1. # onlineoffline tag - don't remove
    2. Order Deny,Allow
    3. Deny from all  
    4. Allow from 127.0.0.1
    5. </Directory>

     

    Deny from all  改为:Allow from all  ,然后重新启动所有服务。

    现在打开localhost或127.0.0.1时发现可以访问了,但访问phpmyadmin时候,出现“You don't have permission to access /phpmyadmin/ on this server.”的提示。

    • 解决方法,打开如下文件: wamp安装目录/alias/phpmyadmin.conf 修改成这样:

     

    1. <Directory "wamp安装目录/apps/phpmyadmin3.5.1/">
    2.     Options Indexes FollowSymLinks MultiViews
    3.     AllowOverride all
    4.     Order Deny,Allow
    5.     Allow from all
    6.     Allow from 127.0.0.1
    7. </Directory>

    修改保存后,重启wamp 。

     

  • 相关阅读:
    【AS3代码】类的分包
    语句include和require的区别是什么?
    php创建多级目录的函数
    【AS3代码】打砖块
    【AS3代码】弧度的转换
    【AS3代码】是男人就坚持30秒
    每天问女儿的四个问题
    PowerDesigner16生成SQL2005列注释
    做分析师=盖房子【转】
    用gephi自动分析网站链接方式
  • 原文地址:https://www.cnblogs.com/yinrw/p/5128524.html
Copyright © 2020-2023  润新知