aboutsummaryrefslogtreecommitdiff
path: root/template/nginx/redirect.conf.template
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-11-27 11:18:47 +0800
committercrupest <crupest@outlook.com>2022-11-27 11:18:47 +0800
commit77d0d76287d51df6178cf0b70656ced0b62df6ef (patch)
treea27aba4a7bbac9181ecb2e71994f8d3411b8975e /template/nginx/redirect.conf.template
parent7e82ff4b8b6fb665b43b05135ba0ea6a2f6adcb5 (diff)
downloadcrupest-77d0d76287d51df6178cf0b70656ced0b62df6ef.tar.gz
crupest-77d0d76287d51df6178cf0b70656ced0b62df6ef.tar.bz2
crupest-77d0d76287d51df6178cf0b70656ced0b62df6ef.zip
Nginx add redirect.
Diffstat (limited to 'template/nginx/redirect.conf.template')
-rw-r--r--template/nginx/redirect.conf.template20
1 files changed, 20 insertions, 0 deletions
diff --git a/template/nginx/redirect.conf.template b/template/nginx/redirect.conf.template
new file mode 100644
index 0000000..e0323ea
--- /dev/null
+++ b/template/nginx/redirect.conf.template
@@ -0,0 +1,20 @@
+server {
+ listen 443 ssl http2;
+ listen [::]:443 ssl http2;
+ server_name ${CRUPEST_NGINX_SUBDOMAIN}.${CRUPEST_DOMAIN};
+
+ return 301 ${CRUPEST_NGINX_URL}$request_uri;
+
+}
+
+server {
+ listen 80;
+ listen [::]:80;
+ server_name ${CRUPEST_NGINX_SUBDOMAIN}.${CRUPEST_DOMAIN};
+
+ return 301 ${CRUPEST_NGINX_URL}$request_uri;
+
+ location /.well-known/acme-challenge {
+ root /srv/acme;
+ }
+}