On Thu, May 03 2018, Jalo Ahonen wrote:
> If not then anyone having a working example of nginx-conf with naked
> domain (= exampledomain.tld) for dl-ticket ?
> My conf [using: dl 0.18.1] consisting of (nginx + subdomain +
> mysql[MariaDB]) works up to a point of: when trying to download a
> file/zip by using the link (sent in the email by dl-ticket) the result
> is: 502 Bad Gateway

Looks like a badly configured location match, or a broken
split_path_info setting more than a subdomain issue. The download link
does a double redirect, first to a .php page directly, then to the same
page but with an extra path appended.

required path_info quirks:

fastcgi_split_path_info ^(.+\.php)(/.+)$;
try_files $fastcgi_script_name =404;
set $path_info $fastcgi_path_info;
fastcgi_param PATH_INFO $path_info;

Likewise, when matching php page, ensure "location" is not just \.php$
but somethink like \.php(?:$|/).

* If you wonder why this double redirect is needed, is mainly to support
old browsers and CLI tools which don't properly support a supplied
filename in the content-type.

Reply via email to