三方存储对象nginx代理支持cos和oss

1、aws-s3 cos oss 等使用NGINX代理文件


server {
  listen       9993;
  server_name  localhost;
  
  client_max_body_size 1024m;
  location /public/{
     proxy_redirect off;
     proxy_set_header Host ip:端口; # 重要
     proxy_set_header X-Real-IP $remote_addr;
     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
     
     proxy_http_version 1.1;
     proxy_set_header Connection "upgrade";  
     proxy_set_header Upgrade $http_upgrade;
     proxy_set_header X-NginX-Proxy true;
     proxy_pass http://ip:端口/;
  }

}


你可能感兴趣的:(nginx,运维)