right-tree/nginx.conf
2023-03-28 13:00:15 +13:00

32 lines
707 B
Nginx Configuration File

events {
worker_connections 512;
}
http {
server {
listen 80;
include /etc/nginx/mime.types;
location / {
proxy_pass http://frontend:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
location /staticfiles {
root /etc/nginx/html/;
}
location ~ ^/(api|admin) {
proxy_pass http://backend:8000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
}