操作原理是利用https站点网页服务器(nginx、Apache等)使用反向代理到七牛云空间域名地址,实现https访问七牛云http图片,进而实现https免费
操作步骤:
新建一个代理网站,域名为image.xx.com,并添加ssl证书,实现https访问
创建七牛云空间,域名指定为img.xx.com
将image.xx.com整站配置反向代理,代理到img.xx.com即可
最后,就可以使用https://image.xx.com/文件名.png访问七牛云http图片了
配置文件:
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; }