| Nginx-ru mailing list archive (nginx-ru@sysoev.ru) [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
 Re: Re[2]: ENV в nginx.conf
 
To: nginx-ru@xxxxxxxxxSubject: Re: Re[2]: ENV в nginx.confFrom: Alexey Kovyrin <alexey@xxxxxxxxxxx>Date: Tue, 14 Jul 2009 20:27:20 -0400Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=gmail.com; s=gamma;        h=domainkey-signature:mime-version:sender:received:in-reply-to         :references:date:x-google-sender-auth:message-id:subject:from:to         :content-type:content-transfer-encoding;        bh=Xw5cCXco8wWR5frOhK4JZ6BenmKWu8nDpd+w9RTTqbg=;        b=jgcXmIdAdk1LUkpGJ5yw7v24mo7sLv0wtM0WyU6cPW4UJUuLs9kkyPAmntNZQKUR+X         MHYuh3UZT23qRTz0lnEqbcXTmfdw6hmZkKIwLuHlkk6kl5cGeaQ9kqyZcYOH6CQEsbua         3fxyO35+6coZN6eU0sdz/ujvSDI2mdKjdMBKo=Domainkey-signature: a=rsa-sha1; c=nofws;        d=gmail.com; s=gamma;        h=mime-version:sender:in-reply-to:references:date         :x-google-sender-auth:message-id:subject:from:to:content-type         :content-transfer-encoding;        b=VcLovEU8xIDrk89X3Y417FZL7tGfv21mE/7k8/vd3bEebqLUoBn7iQ4J3/d+X/sNiC         bF+95KlLMWZJtsHRcI4Mw7iyyYlI+79UyhMsgd/+IuO/0/+I/ILIi37f5lhfKIxQPwWP         x3W95e+OefjdIGSeM08Tektus3ZZkgYlHFmbY=In-reply-to: <E1MQquE-0001Q0-00.xinu-list-ru@xxxxxxxxxxxx>References: <1747931366.20090714223108@xxxxxxxxxxxxx>	 <E1MQquE-0001Q0-00.xinu-list-ru@xxxxxxxxxxxx> 
 кстати смотрю и не понятно - а почему нету такого до сих пор, реально
ведь там ваще не сложно реализовать вроде бы
2009/7/14 xinu <xinu@xxxxxxx>:
> Здравствуйте Михаил,
>
> спасибо.
>
> в моем частном случае, я думал вынести header в include, а вот  if() логику - 
> таки похоже прийдется генерить скриптом - хотя это на мой взгляд не самое 
> лучшее решение.
>
> все таки очень не хватает ENV!!!
> не уже ли это сложно имплементировать?
>
> еще раз спасибо
>
> Сергей
>
> -----Original Message-----
> From: Михаил Монашёв <postmaster@xxxxxxxxxxxxx>
> To: xinu <nginx-ru@xxxxxxxxx>
> Date: Tue, 14 Jul 2009 22:31:08 +0400
> Subject: Re: ENV в nginx.conf
>
>> Здравствуйте, xinu.
>>
>> Генерите конфиг скриптом, который будет прописывать в конфиг нужные
>> значения.
>>
>> x> что то не могу найти возможности доступа в nginx.conf к
>> x> переменным среды. т.е я не хочу передавать переменные скриптам, а в
>> x> использовать их в блоке if()-nginx.conf. (или как в етом примере -
>> x> садить header)
>>
>> x> пробую напр. так:
>> x> $ HNAME=web1  ../nginx/sbin/nginx -t
>> x> [emerg]: directive "add_header" is not terminated by ";" in nginx.conf:21
>> x> configuration file ../nginx/conf/nginx.conf test failed
>>
>> x> в конфиге:
>> x>    21      add_header  X-Gererator   ${ENV:HNAME} ;
>> x> пробовал и так:
>> x>    21      add_header  X-Gererator   $ENV{HNAME} ;
>>
>> x> все это не катит.
>> x> а как Правильно?
>> x> спасибо.
>>
>> x> Сергей
>>
>>
>>
>>
>> --
>>
>> С уважением,
>> Михаил Монашёв, SoftSearch.ru
>> mailto:postmaster@xxxxxxxxxxxxx
>> ICQ# 166233339
>> http://michael.mindmix.ru/
>> Без бэкапа по жизни.
>>
>>
>
>
>
-- 
Alexey Kovyrin
http://kovyrin.info/
 |