I
I
Ivan2020-07-16 12:03:04
Nginx
Ivan, 2020-07-16 12:03:04

Host not found in NGINX resolver error?

There is a certain nginx that someone once configured to work with the "mydomayn.ru" domain.
I needed ELK, and I rolled it out on the host at 192.168.0.246 in LAN.
I create a config for NGINX

server {
            listen      80;
            server_name  kibana.dev kibana.dev.mydomain.ru kibana.local;
            #charset koi8-r;
            access_log  /var/log/nginx-log;
            location /proxy/ {
                allow all;
               resolver 127.0.0.1
                proxy_pass  http://192.168.0.246:5601/app/kibana#/home;
                proxy_redirect     off;
                proxy_set_header   Host             $host;
                proxy_set_header   X-Real-IP        $remote_addr;
                proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
                client_max_body_size       32m;
                client_body_buffer_size    128k;
                proxy_connect_timeout      90;
                proxy_send_timeout         90;
                proxy_read_timeout         90;
                proxy_buffer_size          4k;
                proxy_buffers              4 32k;
                proxy_busy_buffers_size    64k;
                proxy_temp_file_write_size 64k;
                # root   html;
                # index  index.html index.htm;
            }
}

Added to /etc/hosts 192.168.0.246 kibana.dev.mydomain.ru
Reload nginx
Error in log host not found in resolver "proxy_redirect" in /etc/nginx/conf.d/kibana.dev.conf:12
What's wrong It's clear that Google doesn't clearly say what's wrong (

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dimonchik, 2020-07-16
@vanchezz

resolver 127.0.0.1 has nothing to do
with
/etc/hosts add the server that resolves to the DNS

L
Lynn "Coffee Man", 2020-07-16
@Lynn

The error in the log is host not found in resolver "proxy_redirect"

Forgotten ;
resolver 127.0.0.1;
PS It is not clear why a resolver is needed here at all.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question