phpmyadmin - OS X - 禁止 - 您无权访问此服务器上的 /phpmyadmin/setup
问题描述
我有一个 OS X 10.13 MariaDB 服务器,我希望能够在本地网络上使用 phpMyAdmin 搜索数据库。我检查并创建了一个 index.php 文件,并且 php 已安装并在我的计算机上运行,但是当将解压缩的 phpMyAdmin 文件夹放入 /Library/WebServer/Documents/ 文件夹(系统 Web 根目录,而不是用户根目录)并运行 localhost/phpMyAdmin / 或 localhost/phpMyAdmin/setup,我得到:
Forbidden
You don't have permission to access /phpmyadmin/setup on this server.
我相信我的权限是正确的,所以还有什么我应该看的吗?我在这里搜索了堆栈,发现了几年前的一些问题,但它们的答案相互矛盾,并且不是为 OS X 量身定制的,而且由于我是新手,所以我不知道是否可以应用其他 OS 答案我的情况。谢谢。
编辑:所以当我输入“sudo nano /etc/apache2/httpd.conf”并转到行时
#
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other
# <Directory> blocks below.
#
<Directory />
AllowOverride none
Require all denied
</Directory>
并注释掉并更改为
AllowOverride all
Require all allowed
我得到:
Not Found
The requested URL /phpmyadmin/ was not found on this server.
我的错误日志(/private/var/log/apache2/)显示了这个:
[authz_core:error] [pid 2015] [client 127.0.0.1:50343] AH01630: client denied by server configuration: /usr/local/phpmyadmin
所以看起来这与我的系统网络根目录有关,但我很难过。如果有帮助,这是在新安装的 10.13 上,之前没有访问或使用过我所知道的 apache 或 Web 服务器功能,因此在我尝试启动 phpmyadmin 文件夹并运行之前,它不应该被弄乱.
解决方案
我通过使用用户 webserver 文件夹并按照这些说明解决了这个问题。并没有真正解决我遇到的系统网络服务器问题,但这绝对是一个权限问题,因为至少通过使用 /user/Sites 文件夹我现在可以开始了。
推荐阅读
- machine-learning - CNN 模型的损失不收敛
- c# - 在 .net core 3.1.1 Web 应用程序中更改 AzureAD 身份验证的 redirectURI 和 CallbackPath
- sql-server - 了解导致死锁的锁定行为
- c++ - 如何在没有解释的情况下修复 C++ 链接器错误
- php - laravel foreach 和 if else 在计数和变量中循环错误
- video - yuv420p10le(tv) 格式的位打包
- javascript - 将对象从 .filter() 函数返回到另一个模块的问题
- android - Gridlayout 布局在某些 android 上无法正常工作
- python - 变量与列表元素的比较操作
- python - 读取图像作为 Apache Beam 管道的输入