| worker_processes auto; | |
| pid /run/nginx.pid; | |
| error_log /var/log/nginx/error.log; | |
| include /etc/nginx/modules-enabled/*.conf; | |
| events { | |
| worker_connections 768; | |
| } | |
| http { | |
| sendfile on; | |
| tcp_nopush on; | |
| types_hash_max_size 2048; | |
| include /etc/nginx/mime.types; | |
| default_type application/octet-stream; | |
| ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; | |
| ssl_prefer_server_ciphers on; | |
| access_log /var/log/nginx/access.log; | |
| gzip on; | |
| server { | |
| listen 7860; | |
| listen [::]:7860; | |
| server_name _; | |
| location / { | |
| proxy_pass http://localhost:${N8N_PORT}; | |
| proxy_http_version 1.1; | |
| proxy_set_header Upgrade $http_upgrade; | |
| proxy_set_header Connection 'upgrade'; | |
| 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 Authorization 'Bearer ${AGENT_ONE_SECRET}'; | |
| proxy_cache_bypass $http_upgrade; | |
| proxy_read_timeout 86400; | |
| proxy_redirect off; | |
| } | |
| location /gradio/ { | |
| proxy_pass http://localhost:${GRADIO_SERVER_PORT}; | |
| proxy_http_version 1.1; | |
| proxy_set_header Upgrade $http_upgrade; | |
| proxy_set_header Connection 'upgrade'; | |
| 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_cache_bypass $http_upgrade; | |
| proxy_read_timeout 86400; | |
| proxy_redirect off; | |
| } | |
| } | |
| } |