Law/frontend/nginx.conf
2026-02-22 10:57:49 +03:00

35 lines
782 B
Nginx Configuration File

server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
location = /admin {
return 302 /admin.html;
}
location ~* \.jsx$ {
default_type application/javascript;
try_files $uri =404;
}
location / {
try_files $uri /index.html;
}
location /api/ {
proxy_pass http://backend:8000;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /health {
proxy_pass http://backend:8000/health;
proxy_http_version 1.1;
proxy_set_header Host $host;
}
}