Files
mtusi2026lab3/infra/nginx.conf
T

32 lines
741 B
Nginx Configuration File

worker_processes auto;
events {
worker_connections 1024;
}
http {
upstream backend{
server api:8080 max_fails=2 fail_timeout=10s;
}
server {
listen 80;
server_name localhost;
proxy_connect_timeout 5s;
proxy_read_timeout 30s;
location / {
proxy_pass http://backend;
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 /nginx-health {
access_log off;
return 200 "healthy\n";
add_header Content-Type text/plain;
}
}
}