nginx 代理阿里云oss桶
在阿里云oss桶中绑定自定义域名

nginx 配置,其中/C/kuku-phl/web-mobile是桶中文件目录
server {
server_name pwa.cashcc13.cc;
listen 80;
location =/ {
proxy_pass http://oss.p333e.com/C/kuku-phl/web-mobile/phl-p333-1.html;
proxy_set_header Host oss.p333e.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Fowarded-For $remote_addr;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_connect_timeout 10s;
proxy_send_timeout 30s;
proxy_read_timeout 30s;
client_max_body_size 1024m;
}
location / {
rewrite ^/(.*)$ /C/kuku-phl/web-mobile/$1 break;
proxy_pass http://oss.p333e.com;
proxy_set_header Host oss.p333e.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Fowarded-For $remote_addr;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_connect_timeout 10s;
proxy_send_timeout 30s;
proxy_read_timeout 30s;
client_max_body_size 1024m;
}
}
- 感谢你赐予我前进的力量
赞赏者名单
因为你们的支持让我意识到写文章的价值🙏
本文是原创文章,采用 CC BY-NC-ND 4.0 协议,完整转载请注明来自 运维小白
评论
匿名评论
隐私政策
你无需删除空行,直接评论以获取最佳展示效果

