我可以使用http://localhost/phppgadmin/
访问phppgadmin中的postgres数据库但是当我尝试使用我的IP地址http://10.128.0.128/phppgadmin/在phppgadmin中打开我的数据库时,它无法正常工作:
Forbidden
You don't have permission to access /phppgadmin/ on this server.
Apache/2.4.7 (Ubuntu) Server at 10.128.0.128 Port 80
有没有人可以解决我的问题?感谢。
我已将phppgadmin文件编辑成:
DirectoryIndex index.php
AllowOverride None
order deny,allow
deny from all
allow from 10.128.0.128/255.0.0.0 ::1/128
allow from all
但它仍然不起作用....
答案 0 :(得分:0)
您是否以root
用户身份登录?
当你不是root用户时通常会发生这种情况
答案 1 :(得分:0)
默认情况下,/etc/apache2/conf.d/phppgadmin.conf
配置文件会阻止除localhost之外的任何人访问PhpPgAdmin。
添加一行为您的IP制定新的允许规则,因此它看起来像这样:
<Location /phppgadmin>
Order deny,allow
Deny from all
Allow from [Your client IP]
</Location>