apache - 403 Forbidden - 无法解决,搜索高低
问题描述
我已经解决这个错误超过 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 的访问
解决方案
晚饭后我又回来了,它奏效了。我的猜测是 DNS 更新修复了它。
推荐阅读
- vue.js - Put method (with Axios on front-end Vue) changing wrong id
- javascript - 反应选择下拉列表中的事件传播和多状态变化
- vba - 使复选框出现和消失
- nvidia - Nvidia vGPU 软件是否支持 Docker 容器?
- latex - 运行 C:/MIKTEX~1.9/miktex/bin/x64/pdflatex.exe 时出错(退出代码 1)
- php - 当用户点击菜单选项时重定向用户
- python - 有没有办法让列表中的值浮动然后对它们进行排序?
- android - Flutter google_maps_places 搜索后不显示地点
- apache-spark - 在 Dataproc 上使用 Spark 进行跨账户 GCS 访问
- android - 通过@Field 进行改造发布使值成为一个数组