diff options
author | crupest <crupest@outlook.com> | 2024-11-11 01:12:29 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-01-20 23:24:41 +0800 |
commit | 90a72d2d7ed4a5eadfe36f62d81f26ca3324e49b (patch) | |
tree | 0e5241878de3fc7cd36e4e5bcd2eac3ae1b063f6 /templates/nginx/conf.d/root.conf.template | |
parent | 907eff64f175822e1113887a8b547490dadf9687 (diff) | |
download | crupest-90a72d2d7ed4a5eadfe36f62d81f26ca3324e49b.tar.gz crupest-90a72d2d7ed4a5eadfe36f62d81f26ca3324e49b.tar.bz2 crupest-90a72d2d7ed4a5eadfe36f62d81f26ca3324e49b.zip |
HALF WORK: 2024.1.20 - 4
Diffstat (limited to 'templates/nginx/conf.d/root.conf.template')
-rw-r--r-- | templates/nginx/conf.d/root.conf.template | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/templates/nginx/conf.d/root.conf.template b/templates/nginx/conf.d/root.conf.template new file mode 100644 index 0000000..a0b08f8 --- /dev/null +++ b/templates/nginx/conf.d/root.conf.template @@ -0,0 +1,26 @@ +server { + server_name ${CRUPEST_DOMAIN}; + include common/https-listen; + + location / { + root /srv/www; + } + + location /_$CRUPEST_V2RAY_PATH { + if ($http_upgrade != "websocket") { + return 404; + } + + proxy_redirect off; + include common/proxy-common; + proxy_pass http://v2ray:10000; + } +} + +server { + server_name ${CRUPEST_DOMAIN}; + include common/http-listen; + + include common/https-redirect; + include common/acme-challenge; +} |