server {
listen 12001;
server_name localhost;
location / {
root C:\opt\upload\file;
index index.html index.htm;
}
}
然后Java再调用
location /file/{
proxy_pass http://localhost:12001/;
proxy_set_header Host $host:$server_port;
}