$server_name in error_log logfile name

Hety nginx-forum at nginx.us
Wed Sep 21 12:39:42 UTC 2011


I'm currently trying to make a template for future virtual hosts. To
minimize the amount of editing required i am using $server_name in some
parts of the template.

For example:
server_name example.com
access_log  /var/log/www/$server_name-access  combined;
error_log   /var/log/www/$server_name-error   error;

While it works great for access_log directive(logfile is named
example.com-access), error log file name is, actually
$server_name-error. 
I'm running nginx 1.0.6

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,215503,215503#msg-215503



More information about the nginx mailing list