从文件路径中排除位置路径

时间:2014-06-21 10:34:07

标签: nginx config httpserver

在配置文件中,

location /i/ {
    root /data/w3;
}

将发送/data/w3/i/top.gif文件以响应/i/top.gif请求。如何将其设置为忽略文件路径中的i?实际上,我需要将/i/top.gif映射到/data/w3/top.gif

1 个答案:

答案 0 :(得分:2)

location /i/ {
    alias /data/w3/;
}
相关问题