Skip to content

Instantly share code, notes, and snippets.

@JellyBool
Last active August 1, 2019 07:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save JellyBool/b9f67b9a6bf85d48ccf8a03b54e18333 to your computer and use it in GitHub Desktop.
Save JellyBool/b9f67b9a6bf85d48ccf8a03b54e18333 to your computer and use it in GitHub Desktop.
群友的一个 nginx http 跳转 https 的问题,很简单的配置
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;
}
}
@JellyBool
Copy link
Author

群友的一个 nginx http 跳转 https 的问题,很简单的配置

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment