Spaces:
Running
Running
worker_processes 1; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; | |
default_type application/octet-stream; | |
# Brotli configuration (only if using Brotli module) | |
brotli on; | |
brotli_comp_level 6; | |
brotli_types text/plain text/css application/javascript application/json image/svg+xml; | |
sendfile on; | |
keepalive_timeout 65; | |
server { | |
listen 80; | |
server_name localhost; | |
# Static file serving (optional) | |
# root /usr/share/nginx/html; | |
location / { | |
# Example: reverse proxy to a backend app (e.g., Gradio or Flask) | |
proxy_pass http://host.docker.internal:7860; | |
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_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
} | |
} | |
} | |