我一直在尝试编辑pg_hba.conf文件,以便能够仅使用IP地址访问服务器,到目前为止,没有成功.
例如,我可以使用«localhost»访问,但我想使用我的路由器给我的IP地址访问它类似于192.168.1.X
这是mi pg_hba.conf:
# TYPE DATABASE USER ADDRESS METHOD # "local" is for Unix domain socket connections only local all all trust # IPv4 local connections: host all all 127.0.0.1/32 trust # IPv6 local connections: host all all ::1/128 trust # Allow replication connections from localhost, by a user with the # replication privilege. #local replication postgres trust #host replication postgres 127.0.0.1/32 trust #host replication postgres ::1/128 trust host all all 0.0.0.0/0 trust
有帮助吗?