Multiple access_log directives in different contexts
Igor Sysoev
is at rambler-co.ru
Sat Jan 17 20:01:19 MSK 2009
On Sat, Jan 17, 2009 at 05:11:32PM +0100, Sen Haerens wrote:
> I have a traffic log directive in my http block:
>
> http
> {
> # Traffic log
> log_format traffic $time_local | $server_name | $request_length |
> $bytes_sent;
> access_log /var/log/nginx/traffic.log traffic;
> [???]
> }
>
> This works just fine except for virtual hosts that have a custom
> access_log directive defined.
> Traffic is not showing for these domains.
>
> server
> {
> access_log /var/www/example.com/data/logs/nginx.access.log;
> error_log /var/www/example.com/data/logs/nginx.error.log error;
+ access_log /var/log/nginx/traffic.log traffic;
> [???]
> }
>
> How can I use global traffic log and custom access log together?
--
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list