diff options
author | Yuqian Yang <crupest@crupest.life> | 2025-02-19 01:46:25 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-02-19 01:46:25 +0800 |
commit | aea207dd3ed8f28aef0627e67a325e50138159ff (patch) | |
tree | b7cae8778447307dbd3a769bc8481461962dba83 /templates/nginx/conf.d | |
parent | 73d0d67ae1c931bb07aecff4850090e105848ac5 (diff) | |
download | crupest-aea207dd3ed8f28aef0627e67a325e50138159ff.tar.gz crupest-aea207dd3ed8f28aef0627e67a325e50138159ff.tar.bz2 crupest-aea207dd3ed8f28aef0627e67a325e50138159ff.zip |
feat(2fa): move to root domain subpath.
Diffstat (limited to 'templates/nginx/conf.d')
-rw-r--r-- | templates/nginx/conf.d/2fa.conf.template | 17 | ||||
-rw-r--r-- | templates/nginx/conf.d/root.conf.template | 5 |
2 files changed, 5 insertions, 17 deletions
diff --git a/templates/nginx/conf.d/2fa.conf.template b/templates/nginx/conf.d/2fa.conf.template deleted file mode 100644 index 278e4a1..0000000 --- a/templates/nginx/conf.d/2fa.conf.template +++ /dev/null @@ -1,17 +0,0 @@ -server { - server_name 2fa.${CRUPEST_DOMAIN}; - include common/https-listen; - - location / { - include common/proxy-common; - proxy_pass http://2fauth:8000/; - } -} - -server { - server_name 2fa.${CRUPEST_DOMAIN}; - include common/http-listen; - - include common/https-redirect; - include common/acme-challenge; -} diff --git a/templates/nginx/conf.d/root.conf.template b/templates/nginx/conf.d/root.conf.template index a0b08f8..b5f12ef 100644 --- a/templates/nginx/conf.d/root.conf.template +++ b/templates/nginx/conf.d/root.conf.template @@ -6,6 +6,11 @@ server { root /srv/www; } + location /2fa/ { + include common/proxy-common; + proxy_pass http://2fauth:8000/; + } + location /_$CRUPEST_V2RAY_PATH { if ($http_upgrade != "websocket") { return 404; |