Opened 12 years ago

Closed 12 years ago

#199 closed defect (invalid)

error_log not use user-set variable

Reported by: Рустам Загиров Owned by: somebody
Priority: minor Milestone:
Component: nginx-core Version: 1.2.x
Keywords: Cc:
uname -a: Darwin Rustams-iMac.local 12.0.0 Darwin Kernel Version 12.0.0: Mon Aug 6 18:24:39 PDT 2012; root:xnu-2050.9.1~1/RELEASE_X86_64 x86_64
nginx -V: nginx version: nginx/1.2.3
TLS SNI support enabled
configure arguments: --prefix=/usr/local/Cellar/nginx/1.2.3 --with-http_ssl_module --with-pcre --with-ipv6 --with-cc-opt=-I/usr/local/include --with-ld-opt=-L/usr/local/lib --conf-path=/usr/local/etc/nginx/nginx.conf --pid-path=/usr/local/var/run/nginx.pid --lock-path=/usr/local/var/nginx/nginx.lock

Description

Code fragment:

    set $log_path "/logs/site.ru";
    error_log       $log_path/nginx-error_log;

nginx: [emerg] open() "/usr/local/Cellar/nginx/1.2.3/$log_path/nginx-error_log" failed (2: No such file or directory)

Change History (1)

comment:1 by Maxim Dounin, 12 years ago

Resolution: invalid
Status: newclosed

This is expected behaviour. Variables aren't supported by the "error_log" directive.

Note: See TracTickets for help on using tickets.