Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions reverse-proxy-nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ events {
worker_connections 1024;
}
http {
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}

resolver 127.0.0.11;
include /etc/nginx/mime.types;
default_type application/octet-stream;
Expand All @@ -21,6 +26,8 @@ http {

location / {
proxy_pass http://frontend:3000;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}

location /api/ {
Expand All @@ -31,14 +38,20 @@ http {
proxy_busy_buffers_size 256k;
proxy_set_header X-Forwarded-Prefix /api;
proxy_pass http://api:3001/;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}

location /print {
proxy_pass http://print:3003;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}

location /mail {
proxy_pass http://mail:1080;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
server {
Expand All @@ -47,6 +60,8 @@ http {

location / {
proxy_pass http://frontend:3000;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}

location /api/ {
Expand All @@ -57,14 +72,20 @@ http {
proxy_busy_buffers_size 256k;
proxy_set_header X-Forwarded-Prefix /api;
proxy_pass http://http-cache:8080/;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}

location /print {
proxy_pass http://print:3003;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}

location /mail {
proxy_pass http://mail:1080;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
}
Loading