Андрей Харламов, [29.05.21 14:04]
Коллеги, ставлю zabbix на 2х серверах.
1-сервер - сам zabbix и база
2- nginx (php7.4-pgsql zabbix-nginx-conf zabbix-frontend-php)
по завершению не удается подключиться к базе.
настройка postgresql.conf:
#------------------------------------------------------------------------------
# CONNECTIONS AND AUTHENTICATION
#------------------------------------------------------------------------------
# - Connection Settings -
listen_addresses = '000.00.0.0' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost'; use '*' for all
# (change requires restart)
port = 5432 # (change requires restart)
max_connections = 100 # (change requires restart)
#superuser_reserved_connections = 3 # (change requires restart)
unix_socket_directories = '/var/run/postgresql' # comma-separated list of directories
настройка pg_hba.conf:
# Database administrative login by Unix domain socket
local all postgres peer
# TYPE DATABASE USER ADDRESS METHOD
host all all
192.168.0.0/32 trust
# "local" is for Unix domain socket connections only
local all all peer
# IPv4 local connections:
host all all
127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
local replication all peer
host replication all
127.0.0.1/32 md5
host replication all ::1/128 md5
"/etc/postgresql/12/main/pg_hba.conf" 104L, 5003C 103,1 Bot
настройка ngiinx на втором сервере:
server {
listen 80;
server_name
192.168.184.158;
root /usr/share/zabbix;
index index.php;
location = /favicon.ico {
log_not_found off;
}
location / {
try_files $uri $uri/ =404;
}
location /assets {
access_log off;
expires 10d;
}
location ~ /\.ht {
deny all;
}
location ~ /(api\/|conf[^\.]|include|locale) {
deny all;
return 404;