Welcome! Log In Create A New Profile

Advanced

Re: nginx logging with huge vhosts

Jonathan Matthews
April 30, 2014 04:26AM
On 30 Apr 2014 05:56, "Joydeep Bakshi" <joydeep.bakshi@netzrezepte.de>
wrote:
>
> Hello Maxim,
>
> Presently I have configured separate access & error log for each & every
nginx vhost. I wonder if there is other alternative which can log all
vhosts into a common access & error log and later split them according to
vhost for easy debugging.

IIRC there are a variety of projects which do this, with differing degrees
of completeness, robustness and complexity. Google should help - I don't
have any tool names offhand because it's not the early 2000s any more and
things have moved on :-) Logstash, Heka and other centralised logging
systems are your friend. None of these, however, are part of nginx.

If you need to log to a deterministic, per-vhost filename, you might like
to look at using a variable in your access_log declaration. Combined with
only specifying it once at the http{} level of your config, this can reduce
config complexity at a (slight) runtime cost.

Maxim has already provided the links to the documentation describing how to
do this.

HTH,
J

PS I just remembered: AWStats. That's one tool that can do log splitting or
reporting - I forget which. I wouldn't use it these days though. Better
solutions exist.
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx logging with huge vhosts

Joydeep Bakshi April 29, 2014 06:54AM

Re: nginx logging with huge vhosts

Maxim Dounin April 29, 2014 01:52PM

Re: nginx logging with huge vhosts

Joydeep Bakshi April 30, 2014 02:46AM

Re: nginx logging with huge vhosts

Jonathan Matthews April 30, 2014 04:26AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 181
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready