场景:linux,ip+端口+文件转发地址已经可以访问图片,现在想通过域名来访问,比如,
http://你的ip:你的端口/upload/c5696695-1324-4b43-a118-27b7a0c58bf1.jpg
换成
https://www.xxx.com/upload/c5696695-1324-4b43-a118-27b7a0c58bf1.jpg
做法如下,在nginx.conf文件设置
# 图片访问地址
location /uploadFile {
proxy_pass http://你的ip:你的端口/uploadFile/;
}