right-tree/nginx.conf

33 lines
707 B
Nginx Configuration File
Raw Normal View History

2023-02-03 09:24:35 +13:00
events {
worker_connections 512;
}
2021-11-16 17:30:40 +13:00
http {
server {
listen 80;
2023-02-03 09:24:35 +13:00
include /etc/nginx/mime.types;
2021-11-16 17:30:40 +13:00
location / {
2023-02-03 09:24:35 +13:00
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;
2021-11-16 17:30:40 +13:00
}
location /staticfiles {
2023-02-03 09:24:35 +13:00
root /etc/nginx/html/;
}
2023-02-03 09:24:35 +13:00
location ~ ^/(api|admin) {
2021-11-16 17:30:40 +13:00
proxy_pass http://backend:8000;
2023-02-03 09:24:35 +13:00
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;
2021-11-16 17:30:40 +13:00
}
2023-02-03 09:24:35 +13:00
}
2021-11-16 17:30:40 +13:00
}