【Nginx】配置别名


server{

        listen 80;

        server_name localhost;

        location / {

                root  /home/img;

        }

        location /img{

                root  /home;

        }

       #使用别名访问静态资源

        location /static {

                #root  /home/img;

                alias /home/img;

        }

}

















发布了53 篇原创文章 · 获赞 0 · 访问量 813

猜你喜欢

转载自blog.csdn.net/G971005287W/article/details/105251248
今日推荐