location ~ .*\.(gif|jpg|jpeg|png|bmp|mp3)$ { root E:/xx/Uploads/; } 记得放在根目录下面 转载于:https://www.cnblogs.com/cyh2009/p/10328585.html