Created
September 27, 2017 18:12
-
-
Save xuyuji9000/46b6074fec1cd961201171f754c239d3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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