打开编辑 nginx-1.12.1\conf\nginx.conf
文件 在sever中添加 location /image
块儿即可
server {
listen 80;
server_name localhost;
location /image {
root D:/pyworkspace/TGDB/images/;
}
浏览器访问http://127.0.0.1/image/test.jpg
就会加载 D:/pyworkspace/TGDB/images/image/test.jpg
这张图