Can nginx.conf use relative paths?

Igor Sysoev is at rambler-co.ru
Tue Aug 26 20:28:46 MSD 2008


On Tue, Aug 26, 2008 at 03:32:34PM +0200, Sven C. Koehler wrote:

> I am just wondering whether it's possible to use relative paths in the
> nginx.conf, like:
> 
> [ng.conf]
> include common.nginx.conf;
> pid nginx.pid;
> error_log error.log;
> 
> On Gentoo's nginx-0.7.7 I get
> 
> /tmp/ng $ /usr/sbin/nginx -c ng.conf 
> 2008/08/26 13:24:18 [emerg] 14352#0: open() "/etc/nginx/common.conf"
> failed (2: No such file or directory) in ng.conf:1
> 
> (Common.nginx.conf is actually in the cwd.)
> 
> Any ideas besides using absolute paths? 

The paths in configuration depending on directive may be relative to
1) built time nginx.conf path
2) or built time server prefix path.


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list