Use exopages dynamic proxying for Gitea federation testing instance

This commit is contained in:
Anthony Wang 2022-07-10 11:39:29 -05:00
parent a74b897362
commit 782666547b
Signed by: a
GPG Key ID: BC96B00AEC5F2D76
2 changed files with 9 additions and 17 deletions

View File

@ -1,16 +0,0 @@
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name test.exozy.me;
include conf.d/ssl;
location / {
proxy_pass http://localhost:3000;
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;
client_max_body_size 1G;
}
}

View File

@ -8,10 +8,14 @@ server {
index index.html;
location / {
# Must use 127.0.0.1 here since it's resolved at runtime
# https://serverfault.com/questions/638505/nginx-dynamic-proxy-pass-doesnt-resolve-properly
resolver 192.168.122.1;
proxy_pass http://localhost:420$1;
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;
}
}
@ -36,5 +40,9 @@ server {
location @fallback {
proxy_pass http://unix:/srv/http/pages/$page;
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;
}
}