Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
events { worker_connections 1024; }
http {
#upstream servers
upstream martian_servers {
server martian_martian_mongo_flavour_1:4400;
server martian_martian_mongo_flavour_2:4400;
server martian_martian_mongo_flavour_3:4400;
}
# configuration for the nginx server
server {
# configuration
listen [::]:3050;
listen 3050;
# Proxying the connections
location /api {
proxy_pass http://martian_servers;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
location / {
proxy_pass http://martian_servers;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment