Skip to content

Instantly share code, notes, and snippets.

@HarrySky
Created December 22, 2020 22:48
Show Gist options
  • Save HarrySky/b2ac620b845a3a87ecdb0bd827c8050a to your computer and use it in GitHub Desktop.
Save HarrySky/b2ac620b845a3a87ecdb0bd827c8050a to your computer and use it in GitHub Desktop.
nginx default server for getting all LetsEncrypt certificates
server {
listen 80 default_server;
server_tokens off;
access_log off;
location ^~ /.well-known/acme-challenge/ {
alias /usr/share/nginx/html/letsencrypt/.well-known/acme-challenge/;
}
location / {
return 307 https://$host$request_uri;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment