nginx之静态资源映射

主要应用场景:
访问nginx不同目录下的静态资源。

核心配置代码:

location /img/ {
           alias /home/software/nginx/html/img/;
           autoindex on;
}

 

posted @ 2020-11-30 21:10  挑战者V  阅读(1844)  评论(0编辑  收藏  举报