separate access log for vhost?

Igor Sysoev is at rambler-co.ru
Wed Feb 4 09:23:28 MSK 2009


On Wed, Feb 04, 2009 at 02:16:40PM +0800, Max wrote:

> Hello,
> 
> Thanks for the reply.
> 
> Yes, I understand if I have separate server { , I can have different access
> logs. But I don't have separate server { for each domain. I just set the ip.

In 0.7.x you may use variables in access_log path:

     access_log  /path/to/$host.access.log;

However, nginx tests root path existance for every access, as some one may
easy create remotely a lot of such logs.

> Max
> 
> On Wed, Feb 4, 2009 at 1:56 PM, Dan Dascalescu
> <ddascalescu+nginx at gmail.com<ddascalescu%2Bnginx at gmail.com>
> > wrote:
> 
> > > Can I separate access log for different vhosts? Something like:
> > access_log
> > > path/$host.access.log  main; is it possible?
> >
> > Max, see http://wiki.codemongers.com/SeparateErrorLoggingPerVirtualHost


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list