server {
listen 80;
server_name xxx.i.sinotrans.com;
location /test {
root /usr/local/nginx/html/test;
index index.html index.htm;
}
}
-----改成下面 要不然 通过curl http://xxx.i.sinotrans.com/test/index.html 报404
server {
listen 80;
server_name xxx.i.sinotrans.com;
location /test {
root html;
index index.html index.htm;
}
}