nginx 加载图片 nginx图片服务器

打开编辑 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这张图

猜你喜欢

转载自blog.csdn.net/weixin_38570967/article/details/81365225
今日推荐