天天看點

oss https 代理

預設的oss隻有阿裡雲的域名才支援https

這樣采用自己的域名通路代理

例如:

proxy_pass http://ossurl/;

ossurl分為内網和外網

如果和oss在一個網段直接内網調用

如果不在可以走公網

這個位址阿裡雲控制台bucket的概述有提供

server {

listen 443 ; #default_server;

server_name  image.bb.com;

access_log  /home/data/logs/nginx/oss.log main;

ssl                  on; 

ssl_certificate      /opt/CA/bb.pem; 

ssl_certificate_key  /opt/CA/bb.key; 

ssl_session_timeout  5m; 

ssl_protocols  TLSv1 TLSv1.1 TLSv1.2;

ssl_ciphers  HIGH:!RC4:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!EXP:+MEDIUM; 

ssl_prefer_server_ciphers   on; 

location / {

proxy_set_header   Referer http://image.bb.com;

   }

}