阿里云申请免费SSL证书并使用Nginx配置http强制跳转https。
一、场景介绍
因域名需要使用https访问,决定申请阿里云免费SSL证书并使用nginx配置http强制跳转https。
二、具体步骤
1、登录阿里云账户,在首页搜索框中模糊搜索SSL,选择SSL证书
2、点击购买证书选项
3、点击免费型DV_SSL,购买
5、填写证书申请信息
6、下载nginx形式的证书
nginx中进行配置
1、下载并安装nginx
2、nginx安装目录下新建cert文件夹,将下载的证书解压放在/etc/nginx/root/cert目录下
3、进入nginx/conf文件夹中,编辑配置文件
server {
listen 443 ssl;
server_name www.test.club;
ssl_certificate /etc/nginx/root/cert/4106728_www.ljflxcx.club.pem;
ssl_certificate_key /etc/nginx/root/cert/4106728_www.ljflxcx.club.key;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
location / {
root html;
index index.html index.htm;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://103.66.66.66:18881;
}
}
server {
listen 80;
server_name www.test.club;
rewrite ^(.*) https://$server_name$1 permanent;
}
- 【环境配置】申请StartSSL免费CA证书,配置Nginx使用https访问,强制http跳转到https
- Nginx安装配置SSL证书并强制http跳转到https
- 阿里云免费SSL证书申请与安装使用-附Nginx,Apache,IIS 6,IIS 8配置SSL教程
- Nginx配置SSL证书(申请免费SSL证书)怎样给网站的"http"加上"s",即网站可以通过"https"访问?
- 网站升级HTTPS,免费SSL证书Let’s Encrypt安装使用教程:Apache和Nginx配置方法
- nginx强制使用https访问(http跳转到https)
- Nginx强制使用https访问(http跳转到https)
- nginx强制使用https访问(http跳转到https)
- nginx配置https并强制http自动跳转到https
- Nginx强制使用https访问(http跳转到https)
- Nginx的https配置记录以及http强制跳转到https的方法梳理
- nginx强制使用https访问(http跳转到https)
- Linux----阿里云服务器 https 配置(目前用的是1年免费 SSL证书申请)
- 阿里云ECS申请免费ssl证书,实现Tomcat访问域名,使用Https访问
- nginx强制使用https访问(http跳转到https)
- 腾讯云申请免费ssl证书配置tomcat使http变https
- 阿里云申请免费SSL证书,并配置到Tomcat,实现https访问
- nginx强制使用https访问(http跳转到https)
- Nginx+Tomcat+SSL配置(包括https跳转及腾讯免费SSL申请流程)
- Docker内nginx使用301强制http跳转https,解决请求http无数据返回问题