Skip to content

Instantly share code, notes, and snippets.

@harryWonder
Created June 10, 2021 18:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harryWonder/007e9421c06a3c36153b644122cda023 to your computer and use it in GitHub Desktop.
Save harryWonder/007e9421c06a3c36153b644122cda023 to your computer and use it in GitHub Desktop.
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