Created
May 31, 2019 14:20
-
-
Save mutouyuguo/c20cfbe9f1462b1263aec2f88385a573 to your computer and use it in GitHub Desktop.
nginx config
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 443; | |
| server_name codeyuguo.com www.codeyuguo.com; | |
| location / { | |
| root /codeyuguo/www; | |
| index index.html; | |
| try_files $uri $uri/ =404; | |
| } | |
| ssl on; | |
| ssl_certificate /etc/letsencrypt/live/codeyuguo.com/fullchain.pem; | |
| ssl_certificate_key /etc/letsencrypt/live/codeyuguo.com/privkey.pem; | |
| } | |
| server { | |
| listen 80; | |
| server_name codeyuguo.com www.codeyuguo.com; | |
| rewrite ^ https://$host$request_uri? permanent; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment