N
N
NO_GLITCH2018-03-10 00:09:57
Nginx
NO_GLITCH, 2018-03-10 00:09:57

How to properly use map+stream in nginx?

I made this configuration:

stream {
 map $hostname $stream_destination {
  hostname.com ip_address_1;
  hostname2.com ip_address_2;
}
server {
 listen 8080;
 proxy_pass $stream_destination:8080;

    }
}

Of course, nothing works.
Tell me how to make a redirect based on $ hostname?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question