配置静态目录映射不起作用 ,老访问安装目录下的相对文件,原因是nginx的默认配置文件含有css|mv之类的静态资源默认配置,把你的覆盖了,注释了就好了 另外 location /xxx/ { root /root/static #访问1.1.1.1/xxx/1.html会映射到/root/static/xxx/1.html } location /xxx/ { alias /root/static #访问1.1.1.1/xxx会映射到/root/static/1.html }