In certain scenarios, you may need to use OSS to store large volumes of files, but accessing these files requires connecting from a fixed IP address (for example, if the application code has hardcoded an IP, or to negotiate zero-rating with your ISP).
Since OSS services are distributed across multiple IPs that may change at any time, you can set up a reverse proxy using an ECS instance to meet this requirement.
server {
listen 80 default_server;
server_name _;
location / {
proxy_pass http://xxx.oss-cn-qingdao-internal.aliyuncs.com/;
proxy_set_header Referer https://www.yunwei123.com;
}
}
listen 80 default_server;
server_name _;
location / {
proxy_pass http://xxx.oss-cn-qingdao-internal.aliyuncs.com/;
proxy_set_header Referer https://www.yunwei123.com;
}
}