diff options
author | crupest <crupest@outlook.com> | 2022-11-27 11:18:47 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-11-27 11:18:47 +0800 |
commit | 3be4d089dca831ec5e79eb457100a967b8a20398 (patch) | |
tree | a27aba4a7bbac9181ecb2e71994f8d3411b8975e /template/nginx/redirect.conf.template | |
parent | b0a7c606af768b190d5541e407803bd4a30b1dac (diff) | |
download | crupest-3be4d089dca831ec5e79eb457100a967b8a20398.tar.gz crupest-3be4d089dca831ec5e79eb457100a967b8a20398.tar.bz2 crupest-3be4d089dca831ec5e79eb457100a967b8a20398.zip |
Nginx add redirect.
Diffstat (limited to 'template/nginx/redirect.conf.template')
-rw-r--r-- | template/nginx/redirect.conf.template | 20 |
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; + } +} |