upstream claude2api_upstream { server 127.0.0.1:8080; keepalive 32; } server { listen 7860; listen [::]:7860; server_name _; charset utf-8; client_max_body_size 50m; location = / { root /usr/share/nginx/html; try_files /index.html =404; } location = /index.html { root /usr/share/nginx/html; try_files /index.html =404; } location = /favicon.ico { return 204; } location = /v1/models { default_type application/json; alias /usr/share/nginx/html/models.json; } location /v1/messages { proxy_pass http://claude2api_upstream; proxy_http_version 1.1; proxy_buffering off; proxy_read_timeout 3600s; proxy_send_timeout 3600s; 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-Host $host; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Connection ""; } location / { proxy_pass http://claude2api_upstream; proxy_http_version 1.1; proxy_read_timeout 3600s; proxy_send_timeout 3600s; 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-Host $host; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Connection ""; } }