2017-01-23 06:33:45 +00:00
|
|
|
server {
|
|
|
|
# Listen on plain old HTTP
|
2018-09-13 15:52:57 +00:00
|
|
|
listen 80 default_server;
|
2017-01-23 06:33:45 +00:00
|
|
|
|
|
|
|
# Pass this particular URL off to certbot, to authenticate HTTPS certificates
|
|
|
|
location '/.well-known/acme-challenge' {
|
|
|
|
default_type "text/plain";
|
2017-01-25 04:43:56 +00:00
|
|
|
proxy_pass http://localhost:1337;
|
2017-01-23 06:33:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Everything else gets shunted over to HTTPS
|
|
|
|
location / {
|
|
|
|
return 301 https://$http_host$request_uri;
|
|
|
|
}
|
|
|
|
}
|