Quantcast
Channel: Nginx Forum - Nginx Mailing List - English
Viewing all articles
Browse latest Browse all 7229

host names in 1.9 (1 reply)

$
0
0
I'm having some difficulty using the stream directive in 1.9. I may be using it wrong, so please correct me if this is incorrect or not possible.

stream {
server {
listen 1520;
server_name customhost.example.com
proxy_pass db;
}
upstream db {
server 10.100.0.104:1523;
}
}

I have multiple host names (server_name s) that I want to hit 1520 and be proxied to different upstream dbs. I have a second stream context with a different server_name and different upstream db. I can't get this to work. I think I'm missing something. How would I accomplish this? ultimate goal: reverse proxy a database connection based on host name.

Viewing all articles
Browse latest Browse all 7229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>