Files
keeporg/config/nginx/keeporg.conf.tmpl
T
Reactorcoremeltdown 9729edfc9d
ci/woodpecker/push/build Pipeline failed
ci/woodpecker/push/deploy unknown status
Fixed a typo
2026-10-30 10:03:26 +01:00

87 lines
2.8 KiB
Cheetah

### Deployed by https://git.rcmd.space/rcmd/keeporg
server {
listen 80;
listen [::]:80;
server_name keeporg.tiredsysadmin.cc;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
http2 on;
access_log /var/log/nginx/keeporg.tiredsysadmin.cc_access.log json;
error_log /var/log/nginx/keeporg.tiredsysadmin.cc_error.log;
### SSL cert files ###
ssl_certificate {{ .nginx.variables.blog_ssl_certificate }};
ssl_certificate_key {{ .nginx.variables.blog_ssl_certificate_key }};
client_max_body_size 8192M;
server_name keeporg.tiredsysadmin.cc;
location = /validate {
proxy_pass http://127.0.0.1:30021/validate;
proxy_set_header Host $http_host;
proxy_pass_request_body off;
proxy_set_header Content-Length "";
auth_request_set $auth_resp_x_vouch_user $upstream_http_x_vouch_user;
auth_request_set $auth_resp_jwt $upstream_http_x_vouch_jwt;
auth_request_set $auth_resp_err $upstream_http_x_vouch_err;
auth_request_set $auth_resp_failcount $upstream_http_x_vouch_failcount;
}
error_page 401 = @error401;
location @error401 {
return 302 https://auth.tiredsysadmin.cc/login?url=$scheme://$http_host$request_uri&vouch-failcount=$auth_resp_failcount&X-Vouch-Token=$auth_resp_jwt&error=$auth_resp_err;
}
location / {
auth_request /validate;
proxy_set_header X-Vouch-User $auth_resp_x_vouch_user;
proxy_pass http://10.200.1.3:32970;
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-Proto $scheme;
proxy_http_version 1.1;
proxy_redirect off;
# disable buffering uploads to prevent OOM on reverse proxy server and make uploads twice as fast (no pause)
proxy_request_buffering off;
# set timeout
proxy_read_timeout 600s;
proxy_send_timeout 600s;
send_timeout 600s;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location /api {
proxy_pass http://10.200.1.3:32970;
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-Proto $scheme;
proxy_http_version 1.1;
proxy_redirect off;
# disable buffering uploads to prevent OOM on reverse proxy server and make uploads twice as fast (no pause)
proxy_request_buffering off;
# set timeout
proxy_read_timeout 600s;
proxy_send_timeout 600s;
send_timeout 600s;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}