【问题标题】:403 Forbidden - Cannot be Resolved, Searched High and Low403 Forbidden - 无法解决,搜索高低
【发布时间】:2019-02-06 23:49:11
【问题描述】:

我已经解决这个错误超过 4 小时了,“site:stackoverflow.com”上的每个结果在我的谷歌上都是紫色的,我已经尝试了所有建议,但它不起作用。最后,我重新安装了所有 LAMP 堆栈服务,但仍然无法正常工作。如果有人愿意为我解决此问题,我将不胜感激(我仍然是 Linux 新手)。

vi /etc/httpd/conf/httpd.conf

<Directory "/usr/share/phpmyadmin">
    AllowOverride None
    Options None
    Require all granted
</Directory>

vi /etc/httpd/conf.d/phpMyAdmin.conf

Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin

<Directory /usr/share/phpMyAdmin/>
   AddDefaultCharset UTF-8

   <IfModule mod_authz_core.c>
     # Apache 2.4
     <RequireAny>
       Require ip 127.0.0.1
       Require ip <workstationip>
       Require ip ::1
     </RequireAny>
   </IfModule>
   <IfModule !mod_authz_core.c>
     # Apache 2.2
     Order Deny,Allow
     Deny from All
     Allow from 127.0.0.1
     Allow from <workstationip>
     Allow from ::1
   </IfModule>
</Directory>

我也试过这样做:

    <IfModule mod_authz_core.c>
     # Apache 2.4
     <RequireAny>
       Require all granted
     </RequireAny>
   </IfModule>
   <IfModule !mod_authz_core.c>
     # Apache 2.2
     Allow from all
   </IfModule>

我还确保了“setenforce 0”,但仍然没有。

我的 httpd 日志显示“服务器配置”阻止了我访问 /usr/share/phpMyAdmin

【问题讨论】:

  • 仍未解决。我现在尝试将 'chmod 755' 和 'chmod 777' 和 'chgrp' 和 'chown' 放到 /usr/share/phpMyAdmin 文件夹中,但没有结果
  • 确保也设置了&lt;directory "/usr/share/phpMyAdmin"&gt; Require all granted &lt;/directory&gt;,但仍然不起作用。完全重启了,还是不行。

标签: apache phpmyadmin centos


【解决方案1】:

晚饭后我又回来了,它奏效了。我的猜测是 DNS 更新修复了它。

【讨论】:

    猜你喜欢
    • 2015-04-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-11-02
    • 2022-10-09
    • 2020-08-25
    • 2019-12-09
    • 2018-01-05
    相关资源
    最近更新 更多