Skip to content

Instantly share code, notes, and snippets.

@richardaum
Last active July 23, 2019 04:16
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 richardaum/c08042b1f465efe4cab90bc1ab589d28 to your computer and use it in GitHub Desktop.
Save richardaum/c08042b1f465efe4cab90bc1ab589d28 to your computer and use it in GitHub Desktop.
# H60 NGNIX ports
#
# ports:
# hamburgueria60.com, delivery.hamburgueria60.com ..... 3000
#
# preview.delivery.hamburgueria60.com ................. 3010
# Unknown service (probably socket) ................... 8000
#
# restaurant.hamburgueria60.com ....................... 3020
# preview.restaurant.hamburgueria60.com ............... 3021
#
# api.hamburgueria60.com .............................. 5000
# preview.api.hamburgueria60.com ...................... 5001
#
# portainer.hamburgueria60.com ........................ 6000
# buddy.hamburgueria60.com ............................ 6001
#
server {
listen 80;
location / {
if ($host != delivery.hamburgueria60.com) {
return 301 https://$host$request_uri;
}
}
}
server {
server_name hamburgueria60.com;
location / {
return 404;
}
}
# delivery.hamburgueria60.com # 3000
server {
server_name delivery.hamburgueria60.com;
location / {
proxy_pass http://127.0.0.1:3000/;
include /etc/nginx/proxy_params;
}
location /socket.io {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header XForwardedFor $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_pass http://127.0.0.1:3000/socket.io;
}
listen 80;
}
# preview.delivery.hamburgueria60.com # 3010
server {
server_name preview.delivery.hamburgueria60.com;
location / {
proxy_pass http://127.0.0.1:3010/;
include /etc/nginx/proxy_params;
}
}
# restaurant.hamburgueria60.com;
server {
server_name restaurant.hamburgueria60.com;
location / {
proxy_pass http://127.0.0.1:3020/;
include /etc/nginx/proxy_params;
}
}
# preview.restaurant.hamburgueria60.com;
server {
server_name preview.restaurant.hamburgueria60.com;
location / {
proxy_pass http://127.0.0.1:3021/;
include /etc/nginx/proxy_params;
}
}
# api.hamburgueria60.com;
server {
server_name api.hamburgueria60.com;
location / {
proxy_pass http://127.0.0.1:5000/;
include /etc/nginx/proxy_params;
}
}
# preview.api.hamburgueria60.com;
server {
server_name preview.api.hamburgueria60.com;
location / {
proxy_pass http://127.0.0.1:5001/;
include /etc/nginx/proxy_params;
}
}
# (probably) socket, idk
server {
listen 8000;
listen [::]:8000;
location / {
proxy_pass http://127.0.0.1:3000;
include /etc/nginx/proxy_params;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment