geoserver与postgreSQL跨IP访问


问题描述:
将本地的geoserver安装到服务器上,postgreSQL仍安装在本地机器上,所以在Geoserver管理页面中访问数据库就出现了问题:
FATAL: no pg_hba.conf entry for host “192.168.0.123”, user “postgres”, database “postgres” FATAL: no pg_hba.conf entry for host “192.168.0.123”, user “postgres”, database “postgres”

解决方案:
要解决这个问题,只需要在PostgreSQL数据库的安装目录下找到/data/pg_hba.conf,添加如下的配置信息,其中postgres为用户名,192.168.1.2为服务器,192.1.68.1.22为本地的IP:

文件配置说明说明

完成配置后,在geoserver主页面中,添加POSTGIS数据库的连接配置信息:
数据连接信息

其中,postgres为用户名,密码为admin。

转载自:https://blog.csdn.net/xiting_tick/article/details/54090624

You may also like...