Forum: NGINX Unable to use variables in error_log

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Phill (Guest)
on 2009-05-12 12:47
(Received via mailing list)
It seems as though its not currently possible to use variables in
error_log config. At the moment I use a config similar to:

set $root /var/www/myapp;
root $root;
location ~ \.php($|/) {
set $script $uri;
fastcgi_param SCRIPT_FILENAME $root$script;
}

I'd like to add:

error_log $root/logs/error.log;

but that tries to write to "\$root/logs/error.log" rather than the
expanded "/var/www/myapp/logs/error.log".

Will this be available in future releases?
Kirill A. Korinskiy (Guest)
on 2009-05-12 15:54
(Received via mailing list)
At Tue, 12 May 2009 09:41:17 +0100,
Phill <removed_email_address@domain.invalid> wrote:
>
> I'd like to add:
>
> error_log $root/logs/error.log;
>
> but that tries to write to "\$root/logs/error.log" rather than the
> expanded "/var/www/myapp/logs/error.log".
>
> Will this be available in future releases?
>

error_log don't support the http variables.
"坏人" (Guest)
on 2009-05-13 11:18
(Received via mailing list)
error_log不支持变量。error_log的位置又不会经常变,也没用变量的必要

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,1953,1969#msg-1969
This topic is locked and can not be replied to.