1、location root : /path/uri(把匹配的路径追加到配置的路径:/demoProject追加到/usr/local/nginx/front/apps/demo) /demoProject { root /usr/local/nginx/front/apps/demo } 当访问路径为:/demoProject/demo/demo.html时, 实际访问路径为:/usr/local/nginx/front/apps/demo/demoProject/demo/demo.html 2、location alias: /path/uri(把匹配的路径替换为配置的路径:/demoProject替换为/usr/local/nginx/front/apps/demo) /demoProject { alias /usr/local/nginx/front/apps/demo } 当访问路径为:/demoProject/demo/demo.html时, 实际访问路径为:/usr/local/nginx/front/apps/demo/demo/demo.html
标签:demoProject,demo,apps,nginx,alias,location,local,usr From: https://www.cnblogs.com/yuefeng123/p/17185664.html