Postgresql与主机
我正试图通过Capistrano3部署我的Rails应用程序。 在我自己的服务器上,一切正常,但在我的新服务器上,我在访问数据库时遇到了一些问题:Postgresql与主机,postgresql,ssl,ruby-on-rails-4,capistrano3,Postgresql,Ssl,Ruby On Rails 4,Capistrano3,我正试图通过Capistrano3部署我的Rails应用程序。 在我自己的服务器上,一切正常,但在我的新服务器上,我在访问数据库时遇到了一些问题: DEBUG [05c115bf] FATAL: no pg_hba.conf entry for host "ip.address.of.the.server", user "postgres", database "my_database", SSL on DEBUG [05c115bf] FATAL: no pg_
DEBUG [05c115bf] FATAL: no pg_hba.conf entry for host "ip.address.of.the.server", user "postgres", database "my_database", SSL on
DEBUG [05c115bf] FATAL: no pg_hba.conf entry for host "ip.address.of.the.server", user "postgres", database "my_database", SSL off
我知道问题来自pg_hba,但我找不到确切的位置
这就是我尝试过的:
# Database administrative login by Unix domain socket
local all postgres md5
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all peer
# IPv4 local connections:
host all all 127.0.0.1/32 md5
hostssl all all ip.address.of.the.server/24 md5
hostnossl all all ip.address.of.the.server/24 md5
# IPv6 local connections:
host all all ::1/128 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local replication postgres peer
#host replication postgres 127.0.0.1/32 md5
#host replication postgres ::1/128 md5
目前我在这一点上被阻止。如果.server的IP.address.of.the.the.server的IP.address.of.the.the.server,请将要连接的服务器的实际IP地址放在此处。有关详细信息,请访问问题来自我的deploy.rb,我在主机上犯了一个错误。。。很简单
经过数小时的研究,这个问题终于解决了。谢谢您的帮助。当我说.server的
ip.address.of.the
时,我想表明我在开始使用Capistrano 3部署时,在错误上输入了相同的ip地址。我已经添加了这个ip.address.of.server
是我的deploy.rb,用于连接到我的新服务器。更改pg_hba.conf文件后是否重新启动了postgres?