Files
Homepage/nginx.conf

41 lines
1001 B
Nginx Configuration File

user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
# Health proxy endpoint - forwards to internal python service
location /healthcheck {
proxy_pass http://health-proxy:8081$request_uri;
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_connect_timeout 3s;
proxy_read_timeout 5s;
}
# Serve static files
location / {
root /usr/share/nginx/html;
try_files $uri $uri/ =404;
}
error_page 404 /404.html;
}
}