blob: bf6d325fffb6d3d130bfcb31448c253c7a554dde (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#
# Nignx/sites: 00-acme-httpredirect.conf
# Provide ACME challenges to issue certificate from Let's Encrypt,
# and redirect HTTP to HTTPs.
#
# Aaron LI
#
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
location ^~ /.well-known/acme-challenge/ {
default_type text/plain;
root /usr/local/www/acme;
}
location = /.well-known/acme-challenge/ {
return 404;
}
# Redirect to HTTPS
location / {
return 301 https://$host$request_uri;
}
}
|