MapServer错误:FATAL:用户“...”的身份验证失败
我试图在Centos 6虚拟机上运行MapServer 5/PostGIS安装。 我部署地图服务器在我的cgi-bin文件夹,但现在当我查询(使用火狐)mapserv文件 与URL [virtual machine local IP]/cgi-bin/mapserv?MAP=/var/www/cgi-bin/[...]
,我得到的是与它下面的错误消息的图像:MapServer错误:FATAL:用户“...”的身份验证失败
msDrawMap(): Image handling error. Failed to draw layer named '[name of my layer]'.;msPostGISLayerOpen(): Query error. Database connection failed (FATAL: ident authentification failed for user "foo") with connect string 'user=foo dbname=foo password=foo host=localhost port=5432'
我试图在没有运气的情况下更改pg_hba.conf中的设置。 可以使用psql命令将foo数据库作为sql用户和foo作为密码访问。 我能做什么?
accordong到http://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html 变化ident
到md5
用户foo
在hba.conf
Obtain the operating system user name of the client by contacting the ident server on the client and check if it matches the requested database user name. Ident authentication can only be used on TCP/IP connections. When specified for local connections, peer authentication will be used instead. See Section 19.3.5 for details.
您可以检查哪些HBA show hba_file ;
执行'psql'为同一'您使用
psql
你的数据库运行作为'MapServer'的操作系统用户呢? –我正在以root用户的身份运行'psql foo -U foo',我不知道那个操作系统用户是否被MapServer使用,以及如何设置它(我是一种UNIX新手)。 – MattOnyx
从你的答案我看os用户无关紧要:)密码只有ASCII码?没有特殊字符? –