【问题标题】:You don't have permission to access /phpMyAdmin on this server您无权访问此服务器上的 /phpMyAdmin
【发布时间】:2015-10-06 18:18:02
【问题描述】:

我在 Amazon Linux EC2 实例中安装了 LAMP 服务器,如 here 中所述。现在,问题是当我尝试访问http://publicdns/phpMyAdmin 时,它告诉我Forbidden: You don't have permission to access /phpMyAdmin on this server.

我尝试了各种尝试解决此问题的文章,甚至尝试使用符号链接。由于大部分其他文章都是基于手动安装phpMyAdmin,我无法得到正确的结果。

我知道我必须访问一些文件并更改配置,但我不知道如何正确执行。

【问题讨论】:

    标签: linux apache amazon-web-services amazon-ec2 phpmyadmin


    【解决方案1】:

    您需要在 phpMyAdmin.conf 的 Allow 部分下添加您的 IP,以便能够远程访问您的 phpMyAdmin。

    <Directory /usr/share/phpMyAdmin/>
       AddDefaultCharset UTF-8
    
       <IfModule mod_authz_core.c>
         <RequireAny>
           Require ip my-server-ip-here
           Require ip ::1
           Require ip <your ip>
         </RequireAny>
       </IfModule>
       <IfModule !mod_authz_core.c>
         Order Deny,Allow
         Allow from my-server-ip-here
         Allow from ::1
         Allow from <your ip>
       </IfModule>
    </Directory>
    

    重新启动 apache 发布这些更改。

    【讨论】:

    • 但问题是如何访问它?我是说这个文件?
    猜你喜欢
    • 2017-08-10
    • 2017-11-15
    • 2016-07-13
    • 2013-10-21
    • 2014-06-07
    • 2023-03-22
    • 2017-02-08
    • 2012-05-22
    相关资源
    最近更新 更多