# Error log

**URL:** <https://www.ruby-forum.com/t/error-log/208063>\
**Category:** NGINX\
**Created:** [June 9, 2011, 1:01pm UTC](https://www.ruby-forum.com/t/error-log/208063 "2011-06-09T13:01:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [June 9, 2011, 1:01pm UTC](https://www.ruby-forum.com/t/error-log/208063/1 "2011-06-09T13:01:14Z")

</div>

I setup error and access logs as

access\_log /logs/access/$server\_name.access.log main;  
error\_log /logs/error/$server\_name.error.log info;

access logs are created correctly for each virtual host, but for  
error\_log “$server\_name” is not transformed to the server name, and one  
error log named “$server\_name.error.log” is created.

Posted at Nginx Forum:

> **[error log](https://forum.nginx.org/read.php?2,205230,205230#msg-205230)**
>
> I setup error and access logs as access\_log /logs/access/$server\_name.access.log main; error\_log /logs/error/$server\_name.error.log info; access logs are created correctly for each virtual host, but for error\_log "$server\_name" is not...

---

<div class="post-metadata">

**Author:** ![etrader](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b5e925/32.png) [@etrader](https://www.ruby-forum.com/u/etrader)\
**Post date:** [June 9, 2011, 1:03pm UTC](https://www.ruby-forum.com/t/error-log/208063/2 "2011-06-09T13:03:42Z")

</div>

On Thu, Jun 09, 2011 at 07:00:32AM -0400, etrader wrote:

> I setup error and access logs as
> 
> access\_log /logs/access/$server\_name.access.log main;  
> error\_log /logs/error/$server\_name.error.log info;
> 
> access logs are created correctly for each virtual host, but for  
> error\_log “$server\_name” is not transformed to the server name, and one  
> error log named “$server\_name.error.log” is created.

nginx does not currently support variables in error\_log name.

–  
Igor S.
