File size: 1,558 Bytes
e45e71c be2951a e45e71c be2951a e45e71c ac2df19 e45e71c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | 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 "";
}
}
|