diff options
author | crupest <crupest@outlook.com> | 2022-11-20 13:37:05 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-11-20 13:37:05 +0800 |
commit | 4e6dcdc7c56e65cb8d69e35ec0b0ebc5a47f940c (patch) | |
tree | e438ebe543bee5e2afba086609096ec5ef4fc437 /template/nginx/root.conf.template | |
parent | c20cacc48fde3da0cdb0fbd08184ae5637044c99 (diff) | |
download | crupest-4e6dcdc7c56e65cb8d69e35ec0b0ebc5a47f940c.tar.gz crupest-4e6dcdc7c56e65cb8d69e35ec0b0ebc5a47f940c.tar.bz2 crupest-4e6dcdc7c56e65cb8d69e35ec0b0ebc5a47f940c.zip |
Fix some nginx bugs.
Diffstat (limited to 'template/nginx/root.conf.template')
-rw-r--r-- | template/nginx/root.conf.template | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/template/nginx/root.conf.template b/template/nginx/root.conf.template index 8af8fff..a6992c7 100644 --- a/template/nginx/root.conf.template +++ b/template/nginx/root.conf.template @@ -8,3 +8,17 @@ server { root /srv/www; } + +server { + listen 80; + listen [::]:80; + server_name ${CRUPEST_DOMAIN}; + + location / { + return 301 https://$host$request_uri; + } + + location /.well-known/acme-challenge { + root /srv/acme; + } +} |