Welcome! Log In Create A New Profile

Advanced

Два location со статикой

February 06, 2018 07:55AM
Добрый день
Помогите пожалуйста настроить nginx. На одном домене, два урла. Надо что бы по двум урлам отдавалась разная статика.

location /v3/ {
location ~* \.(xsl|ico|gif|png|svg|js|css|html|ttf|woff|json|xml)$ {
index index.html;
root /opt/DATA/stat/otp24v3;
expires -1;
}
}

location / {
location ~* \.(xsl|ico|gif|png|svg|js|css|html|ttf|woff|json|xml)$ {
index index.html;
access_log off;
root /opt/DATA/stat/otp24;
expires -1;
}
}

дергаю домен/v3/ получаю 404

В логе
018/02/06 14:34:02 [error] 1338189#0: *217105 open() "/opt/nginx/html/v3" failed (2: No such file or directory), cli
ent: 10.42.1.53, server: domain.ru, request: "GET /v3 HTTP/1.1", host: "domain.ru"

Файлы статики по путям ессть, корень отрабатывает четко, а вот v3 выдает 404 и не могу побороть ((
Subject Author Posted

Два location со статикой

darksmoke February 06, 2018 07:55AM

Re: Два location со статикой

Maksim Kulik February 06, 2018 08:02AM

Re: Два location со статикой

darksmoke February 06, 2018 08:42AM

Re: Два location со статикой

Валентин Бартенев February 06, 2018 08:56AM

Re: Два location со статикой

darksmoke February 06, 2018 09:08AM

Re: Два location со статикой

Valentin V. Bartenev February 06, 2018 09:14AM

Re: Два location со статикой

Maxim Dounin February 06, 2018 09:14AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 70
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready