listen 80;
    server_name localhost;
    location /abc {
    root /tmp;
    index index.html;
    }

    http://xxx/abc
    image.png
    http://xxx/abc/
    image.png

    不加 / , nginx内部自动做一个 301 跳转

    | Syntax: | server_name_in_redirect on | off;

    | | —- | —- | | Default: | server_name_in_redirect off; | | Context: | http, server, location |

    on 以 server_name 重定向
    image.png
    off 以 请求头$HOST 重定向