Welcome! Log In Create A New Profile

Advanced

$server_name in error_log logfile name

September 21, 2011 08:39AM
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
Subject Author Posted

$server_name in error_log logfile name

Hety September 21, 2011 08:39AM

Re: $server_name in error_log logfile name

etrader September 22, 2011 01:17PM

Re: $server_name in error_log logfile name

Hety September 23, 2011 06:52AM

Re: $server_name in error_log logfile name

Maxim Dounin September 23, 2011 07:20AM

Re: $server_name in error_log logfile name

Hety September 23, 2011 07:58AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 79
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready