Last active
August 1, 2019 07:23
-
-
Save JellyBool/b9f67b9a6bf85d48ccf8a03b54e18333 to your computer and use it in GitHub Desktop.
群友的一个 nginx http 跳转 https 的问题,很简单的配置
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 www.pixivlink.com pixivlink.com; | |
return 301 https://$host$request_uri; | |
} | |
server { | |
listen 443 ssl; | |
server_name pixivlink.com; | |
index index.html index.htm; | |
ssl on; | |
ssl_certificate /etc/ssl/pixivlink.com.crt; | |
ssl_certificate_key /etc/ssl/pixivlinl.com.key; | |
location / { | |
root /var/www/html/docs; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
群友的一个 nginx http 跳转 https 的问题,很简单的配置