如何使用七牛云http免费空间实现全站https
利用https站点网页服务器(nginx、Apache等)使用反向代理到七牛云空间域名地址,实现https访问七牛云http图片
操作步骤
- 新建一个代理网站,域名为
image.xx.com
,并添加ssl证书,实现https访问 - 创建七牛云空间,域名指定为
img.xx.com
- 将
image.xx.com
整站配置反向代理,代理到img.xx.com
即可 - 最后,就可以使用
https://image.xx.com/文件名.png
访问七牛云http图片了
配置文件
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
location / { proxy_pass http://img.xx.cn; proxy_set_header Host img.xx.cn; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header REMOTE-HOST $remote_addr; #持久化连接相关配置 #proxy_connect_timeout 30s; #proxy_read_timeout 86400s; #proxy_send_timeout 30s; #proxy_http_version 1.1; #proxy_set_header Upgrade $http_upgrade; #proxy_set_header Connection "upgrade"; add_header X-Cache $upstream_cache_status; expires 12h; } |
配置反向代理
这些信息可能会帮助到你: 关于我们 | 侵权删除 | 捐赠支持
优惠推广:外卖红包天天领,下单享返钱,邀好友赚钱~文章名称:如何使用七牛云http免费空间实现全站https
文章链接:https://www.bysjb.cn/https.html
THE END
二维码
打赏


共有 0 条评论