1worker_processes 1;
2pid /tmp/nginx.pid;
3error_log /dev/stderr;
4events { worker_connections 256; }
5http {
6 access_log off;
7 client_body_temp_path /tmp/client;
8 proxy_temp_path /tmp/proxy;
9 fastcgi_temp_path /tmp/fastcgi;
10 uwsgi_temp_path /tmp/uwsgi;
11 scgi_temp_path /tmp/scgi;
12 map $http_upgrade $connection_upgrade { default upgrade; '' close; }
13 server {
14 listen 127.0.0.1:18889;
15 client_max_body_size 32m;
16 location = /healthz { proxy_pass http://127.0.0.1:18890/healthz; }
17 location / {
18 if ($http_x_openclaw_user = '') { return 403; }
19 proxy_pass http://127.0.0.1:18890;
20 proxy_http_version 1.1;
21 proxy_set_header Upgrade $http_upgrade;
22 proxy_set_header Connection $connection_upgrade;
23 proxy_set_header Host openclaw.paperclover.net;
24 proxy_set_header X-Forwarded-Host openclaw.paperclover.net;
25 proxy_set_header X-Forwarded-Proto https;
26 proxy_set_header X-Forwarded-For $http_x_forwarded_for;
27 proxy_set_header X-OpenClaw-User $http_x_openclaw_user;
28 proxy_buffering off;
29 proxy_read_timeout 28800s;
30 }
31 }
32 server {
33 listen 127.0.0.1:18881;
34 location /v1/ {
35 proxy_pass https://ai.paperclover.net;
36 proxy_ssl_server_name on;
37 proxy_ssl_verify on;
38 proxy_ssl_verify_depth 5;
39 proxy_ssl_trusted_certificate /etc/ssl/certs/ca-certificates.crt;
40 proxy_set_header Host ai.paperclover.net;
41 proxy_set_header Authorization "Bearer MODEL_API_KEY";
42 proxy_buffering off;
43 proxy_read_timeout 28800s;
44 }
45 location / { return 404; }
46 }
47}