Skip to content

Instantly share code, notes, and snippets.

@xuyuji9000
Created September 27, 2017 18:12
Show Gist options
  • Save xuyuji9000/46b6074fec1cd961201171f754c239d3 to your computer and use it in GitHub Desktop.
Save xuyuji9000/46b6074fec1cd961201171f754c239d3 to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name ssl2.yogiman.cn;
location /.well-known {
allow all;
}
location / {
return 301 https://$server_name$request_uri;
}
}
server {
listen 443 ssl;
server_name ssl2.yogiman.cn;
ssl_certificate /etc/letsencrypt/live/ssl2.yogiman.cn/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ssl2.yogiman.cn/privkey.pem;
root /var/www/html;
index index.html;
location / {
try_files $uri $uri/ =404;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment