Welcome! Log In Create A New Profile

Advanced

Re: x-accel-redirect и content-type

January 08, 2016 11:10AM
Включил отладочный лог nginx и разобрался сам.

Причиной была ошибка в конфиге nginx: для каталога /attach не был указан alias, из-за чего nginx не находил нужный файл в том запросе, где был задан свой Content-Type.
Т.е. было так:
location /attach/ {
internal;
}

а надо было вот так:
location /forum/attach/ {
alias /home/mysite.com/www/attach/;
internal;
}

А для файла с расширением gif сразу было все хорошо т.к. nginx находил его по другому правилу:
location ~* ^.+\.(jpg|jpeg|gif|png)$ {
root /home/mysite.com/www/;
}

Спасибо всем!
Subject Author Posted

x-accel-redirect и content-type

cuper6 January 08, 2016 09:08AM

Re: x-accel-redirect и content-type

cuper6 January 08, 2016 11:10AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 167
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready