Skip to content
This repository was archived by the owner on Jul 6, 2023. It is now read-only.
This repository was archived by the owner on Jul 6, 2023. It is now read-only.

Mismatch in x-accel and xsendfile docs on trailing slash #563

Closed
@mikehaertl

Description

@mikehaertl

There is a minor mismatch on the documentation regarding the trailing slash.

In https://github.com/nginxinc/nginx-wiki/blob/master/source/start/topics/examples/xsendfile.rst a trailing slash is mentioned for alias:

If you want to deliver /some/path/iso.img then configure NGINX like this:

location /protected/ {
  internal;
  alias   /some/path/; # note the trailing slash
}

Whereas on https://github.com/nginxinc/nginx-wiki/blob/master/source/start/topics/examples/x-accel.rst the trailing slash is not mentioned at all:

Example configuration, notice the difference between alias and root.

# Will serve /var/www/files/myfile.tar.gz
# When passed URI /protected_files/myfile.tar.gz
location /protected_files {
  internal;
  alias /var/www/files;
}

This leaves me confused: Do we need the trailing slash or not?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions