Dynamic error_log location using regex captures

justin nginx-forum at nginx.us
Tue Nov 6 05:40:34 UTC 2012

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

More information about the nginx mailing list