7 messages in ru.sysoev.nginxRe: Set a variable in configuration file
FromSent OnAttachments
ThomasJul 8, 2008 4:25 pm 
Marcos NevesJul 8, 2008 8:09 pm 
ThomasJul 9, 2008 2:54 am 
ThomasAug 31, 2008 3:56 am 
Igor SysoevAug 31, 2008 10:10 pm 
ThomasSep 10, 2008 8:06 am 
Igor SysoevSep 11, 2008 1:34 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Set a variable in configuration fileActions...
From:Igor Sysoev (is-G@public.gmane.org)
Date:Sep 11, 2008 1:34:46 pm
List:ru.sysoev.nginx

On Wed, Sep 10, 2008 at 05:06:45PM +0200, Thomas wrote:

Here is an excerpt of my conf file:

--- set $ngx_path /usr/local/nginx/logs; set $app_path /home/application; ... root $app_path/myblog; access_log $ngx_path/access.myblog.log;

---

And here is the error message I get when I start nginx:

------ 2008/09/10 17:01:11 [emerg] 588#0: open() "/usr/local/nginx/$ngx_path/access.myblog.log" failed (2: No such file or directory)

Setting a path variable doesn't work with the log files.

access_log supports variables since 0.7.6+ only.

BTW, it's not good idea to set some variable to static values on server level and then use them. You may simply define common "root" and "access_log" on server level.