惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
DataBreaches.Net
V
Vulnerabilities – Threatpost
C
CERT Recently Published Vulnerability Notes
Google DeepMind News
Google DeepMind News
GbyAI
GbyAI
Y
Y Combinator Blog
T
Threatpost
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Project Zero
Project Zero
Engineering at Meta
Engineering at Meta
MongoDB | Blog
MongoDB | Blog
MyScale Blog
MyScale Blog
Security Latest
Security Latest
T
Threat Research - Cisco Blogs
量子位
I
Intezer
Simon Willison's Weblog
Simon Willison's Weblog
C
Cybersecurity and Infrastructure Security Agency CISA
L
Lohrmann on Cybersecurity
L
LINUX DO - 最新话题
The Register - Security
The Register - Security
T
Tailwind CSS Blog
爱范儿
爱范儿
Google DeepMind News
Google DeepMind News
T
Troy Hunt's Blog
Stack Overflow Blog
Stack Overflow Blog
Cloudbric
Cloudbric
S
Secure Thoughts
The GitHub Blog
The GitHub Blog
T
The Blog of Author Tim Ferriss
L
LangChain Blog
Recorded Future
Recorded Future
小众软件
小众软件
www.infosecurity-magazine.com
www.infosecurity-magazine.com
T
Tor Project blog
人人都是产品经理
人人都是产品经理
F
Full Disclosure
O
OpenAI News
Webroot Blog
Webroot Blog
A
Arctic Wolf
TaoSecurity Blog
TaoSecurity Blog
P
Privacy & Cybersecurity Law Blog
Jina AI
Jina AI
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
雷峰网
雷峰网
Microsoft Security Blog
Microsoft Security Blog
H
Heimdal Security Blog
B
Blog RSS Feed
Vercel News
Vercel News

克洛洛日记

一年回本计划 | 克洛洛日记 股票期权的Theta | 克洛洛日记 股票期权的Gamma | 克洛洛日记 股票期权的Delta | 克洛洛日记 KDJ指标 | 克洛洛日记 布林线 | 克洛洛日记 MACD指标 | 克洛洛日记 RSI指标 | 克洛洛日记 时间协议 | 克洛洛日记 聊聊Spring的stereotype注解 | 克洛洛日记 免费申请 JetBrains 全产品 License | 克洛洛日记 Aloha 一个Hexo主题 | 克洛洛日记 泰国之旅 [三] | 克洛洛日记 泰国之旅 [二] | 克洛洛日记 泰国之旅 [一] | 克洛洛日记 i18next | 克洛洛日记 错误排查:非ROOT用户使用密钥进行ssh登录提示输入密码 | 克洛洛日记 使用Github、Travis-CI和Coding.net自动部署博客[三] | 克洛洛日记 使用EditorConfig | 克洛洛日记 JavaScript执行window.print()打印内容为空白 | 克洛洛日记 使用Github、Travis-CI和Coding.net自动部署博客[二] | 克洛洛日记 寓食记 | 克洛洛日记 使用Github、Travis-CI和Coding.net自动部署博客[一] | 克洛洛日记 书单 | 克洛洛日记 WebJars使用示例 | 克洛洛日记 WebJars介绍 | 克洛洛日记 Maven打jar包内容出错 | 克洛洛日记 数据分布式模型 | 克洛洛日记 Wicket的HelloWorld | 克洛洛日记 Java运行时内存结构 | 克洛洛日记 前端优化法则 | 克洛洛日记
Nginx使用SSL证书配置https | 克洛洛日记
海拉鲁球果 <hyrul · 2019-02-24 · via 克洛洛日记

· nginx / qcloud / ssl / https

申请SSL证书

首先申请SSL证书,这里以腾讯云的免费DVSSL证书为例,前往 https://console.cloud.tencent.com/ssl/apply

  • 填入通用名称,比如 www.wxio.club
  • 最好不要密码
  • 填好其他信息
  • 点击下一步,如果域名在腾讯云解析,就选择 自动DNS验证,否则按照选项进行配置
  • 点击确认申请

下载和上传证书

前往 https://console.cloud.tencent.com/ssl 下载刚申请的证书,以 www.wxio.club 为例,解压后有

.
├── Apache
│   ├── 1_root_bundle.crt
│   ├── 2_www.wxio.club.crt
│   └── 3_www.wxio.club.key
├── IIS
│   ├── keystorePass.txt
│   └── www.wxio.club.pfx
├── Nginx
│   ├── 1_www.wxio.club_bundle.crt
│   └── 2_www.wxio.club.key
├── Tomcat
│   ├── keystorePass.txt
│   └── www.wxio.club.jks
└── www.wxio.club.csr

复制Nginx里的 1_www.wxio.club_bundle.crt 和 2_www.wxio.club.key 到服务器的 /etc/nginx (其实那都可以)

配置 nginx.conf

编辑器打开 /etc/nginx/nginx.conf, 在 http 下面,添加或者修改配置:

server {
        listen 80;
        server_name www.wxio.club wxio.club;
        rewrite ^(.*)$ https://${server_name}$1 permanent; # 这里是使 http 跳转到 https
}

server {
        listen 443;
        server_name www.wxio.club wxio.club;

        ssl on;
        ssl_certificate 1_www.wxio.club_bundle.crt; # 这里可以写 .crt 的全路径
        ssl_certificate_key 2_www.wxio.club.key; # 这里可以写 .key 的全路径
        ssl_session_timeout 5m;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
        ssl_prefer_server_ciphers on;

        location / {
                root /home/git/www/public;
                index index.html index.htm;
        }

}

重启 nginx 服务

service nginx restart