Forum: NGINX Dynamic error_log location using regex captures

Posted by justin (Guest)
on 2012-11-06 06:40
(Received via mailing list)
Why can't I use a dynamic error_log location like I do with access_log?
Example config:

  server_name ~^(?<username>.+)\.my-domain\.com$;

  root /srv/www/accounts/$username/app;

  access_log /var/log/nginx/accounts/$username/access.log;
  error_log /var/log/nginx/accounts/$username/error.log;

This does not work, since for some reason nginx chokes out on the 
dynamic
error_log location. Feature request?

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?2,232516,232516#msg-232516
Posted by Valentin V. Bartenev (Guest)
on 2012-11-06 13:34
(Received via mailing list)
On Tuesday 06 November 2012 09:40:34 justin wrote:
> Why can't I use a dynamic error_log location like I do with access_log?
> [...]

Because it is "error_log" that may contain critical errors, therefore it 
must
always be accessible.

 wbr, Valentin V. Bartenev

--
http://nginx.com/support.html
http://nginx.org/en/donation.html
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.