从另一台计算机访问 phppgadmin?
我已经在 Ubuntu 服务器中安装了 phppgadmin,并且想从另一台计算机访问它。
它说访问被拒绝。
http://<ip>/phppgadmin
当我输入: The port 5432 is opening in the Ubuntu server but just for local ip 时,
谢谢
I have installed phppgadmin in a Ubuntu server and want to access it from another computer.
It said access denied when i typed:
http://<ip>/phppgadmin
The port 5432 is opened in the Ubuntu server but just for local ip.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
默认情况下,/etc/apache2/conf.d/phppgadmin.conf 配置文件阻止除 localhost 之外的任何人访问 PhpPgAdmin。
添加一行,为您的 IP 创建新的允许规则,因此它看起来像这样:
顺便说一句,这种问题可能更适合 stackoverflow 的姊妹站点 serverfault.com
The /etc/apache2/conf.d/phppgadmin.conf configuration file by default keeps anyone but localhost from accessing PhpPgAdmin.
Add a line that makes a new allow rule for your IP, so it looks something like this:
By the way, this kind of question is probably more appropriate for stackoverflow's sister site serverfault.com
我知道这是一个老问题,但因为我在尝试从另一台计算机访问 phpPgAdmin 时偶然发现它试图修复“无法加载资源:服务器响应状态为 403(禁止)”错误,并且给出的答案没有'不适合我,我想分享我的解决方案。
乌班图:17.04; phpPgAdmin:5.1
解决方案:
在 /etc/apache2/conf-enabled/phppgadmin.conf 中注释掉 Require local 并重新启动 apache (sudo service apache2 reload)
/etc/apache2/conf-enabled/phppgadmin.conf
I know this is an old question but since i stumbled on it trying to fix the "Failed to load resource: the server responded with a status of 403 (Forbidden)" error while trying to access phpPgAdmin from another computer and the given answers didn't work for me, I wanted to share my solution.
Ubuntu: 17.04; phpPgAdmin: 5.1
Solution:
Comment out Require local in /etc/apache2/conf-enabled/phppgadmin.conf and restart apache (sudo service apache2 reload)
/etc/apache2/conf-enabled/phppgadmin.conf
这是一个 apache(或 Web 服务器)问题。您的 phppgadmin 目录有一个 .htaccess 文件,不允许除 localhost 之外的所有人。
您需要将其设置为“允许全部”或“允许”(在此处插入 IP)
This is an apache (or web server) issue. You're phppgadmin directory has a .htaccess file disallowing EVERYONE except localhost.
You need to either set it to Allow ALL or Allow (insert IP here)
你正在运行阿帕奇吗?
您需要更改 httpd.conf 文件或 .htaccess 中的权限
http:// /httpd.apache.org/docs/2.0/misc/security_tips.html
Are you running Apache?
You need to change your permissions in the httpd.conf file or .htaccess
http://httpd.apache.org/docs/2.0/misc/security_tips.html
我也想分享我的解决方案。
64 位 ARM 上的 Debian 10.1、Apache 2.4.38 和 phpPgAdmin 5.1。
以下配置将允许本地和 LAN 访问,但(出于安全原因)不允许 WAN 访问。
/etc/apache2/conf-enabled/phppgadmin.conf
I want to share my solution as well.
Debian 10.1 with Apache 2.4.38 and phpPgAdmin 5.1 on 64-Bit ARM.
The following config will allow local and LAN access, but (for security reasons) NO WAN access.
/etc/apache2/conf-enabled/phppgadmin.conf