Я использую nginx в качестве обратного прокси. Graylog uri conf
graylog.conf:
rest_listen_uri= http://127.0.0.1:9000/
rest_transport_uri = http://192.168.1.1:9000/api/
nginx.conf:
server {
server_name graylog.example.in;
listen 80 default_server;
return 301 https://$server_name$request_uri;
}
server {
server_name graylog.example.in;
listen 443 ssl;
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Graylog-Server-URL https://graylog.example.in/api;
proxy_pass http://127.0.0.1:9000;
}
#location /api/ {
# proxy_set_header Host $http_host;
# proxy_set_header X-Forwarded-Host $host;
# proxy_set_header X-Forwarded-Server $host;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_pass http://127.0.0.1:12219/;
#}
}
Я получаю сообщение об ошибке из журнала nginx
91#0: *1148 connect() failed (111: Connection refused) while connecting to upstream,
nginx log 2017/03/08 23:57:11 [ошибка] 1194 # 0: * 3 connect () не удалось (111: соединение отклонено) при подключении к восходящему потоку, клиент: 137.97.3.237, сервер:, запрос: "POST / api / cluster / metrics / multiple HTTP / 1.1 ", восходящий поток:"http://127.0.0.1:9000/api/cluster/metrics/multipl
вот мой
Graylog
web_listen_uri = http://0.0.0.0:9000/
rest_listen_uri = http://0.0.0.0:12900/
rest_transport_uri = http://127.0.0.1:12900/
nginx
location / {
proxy_http_version 1.1;
proxy_set_header X-Graylog-Server-URL https://graylog.example.com/api;
proxy_pass http://127.0.0.1:9000;
}
location /api/ {
proxy_http_version 1.1;
proxy_pass http://127.0.0.1:12900/;