Welcome! Log In Create A New Profile

Advanced

include в if-е

Ilya Lobahin
December 07, 2011 06:26AM
Здравствуйте, коллеги.

Пытаюсь сделать так:
location ~ \.php$ {
if ( $uri !~ "^/images/" ){
include /etc/nginx/fastcgi.conf;
}
}

Получаю:
nginx: [emerg] "include" directive is not allowed here
Почему? В описании директивы контекст любой.

Приходится извращаться так:
location ~ \.php$ {
if ( $uri !~ "^/images/" ){
fastcgi_pass 127.0.0.1:8181; # By all means use a different server for the fcgi processes if you need to
}
include /etc/nginx/fastcgi2.conf;
}


--
С уважением,
Лобахин Илья
Системный администратор
NIKITA.ONLINE
115201, Москва, Каширское шоссе д. 22/4 строение 7
e-mail: mailto:i.lobahin@nikitaonline.ru
Тел./Факс: +7 (495) 788-7936
http://www.nikitaonline.ru
http://www.gamexp.ru

_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

include в if-е

Ilya Lobahin December 07, 2011 06:26AM

Re: include в if-е

Aleksandr Sytar December 07, 2011 06:44AM

Re[2]: include в if-е

Ilya Lobahin December 07, 2011 07:02AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 291
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