How to use the gzip format for access_log in the new 1.3.10?

Guys I updated from nginx 1.3.9 to 1.3.10, edited my access_log line and
here it is now:
access_log /var/www/blahblah/logs/access.log gzip buffer=32k;

Unfortunately when I restart nginx I get this error:
nginx: [emerg] unknown log format “gzip”

What am I doing wrong?

Thanks in advance.

On Wednesday 26 December 2012 03:16:51 Lorenzo R. wrote:

Guys I updated from nginx 1.3.9 to 1.3.10, edited my access_log line and
here it is now:
access_log /var/www/blahblah/logs/access.log gzip buffer=32k;

Unfortunately when I restart nginx I get this error:
nginx: [emerg] unknown log format “gzip”

What am I doing wrong?

Thanks in advance.

You forgot to specify log format (“gzip” is not log format).

http://nginx.org/r/access_log
http://nginx.org/r/log_format

wbr, Valentin V. Bartenev

http://nginx.org/en/donation.html

Thanks Valentin!

access_log /var/www/blahblah/logs/access.log combined gzip; worked :slight_smile:

**Last question: what does the flush variable do? Does it specify for
how much times to keep the logs?

2012/12/26 Lorenzo R. [email protected]

Oh, I was forgetting: is there a way to globally set to gzip access_log?
Cause I have a lot of websites and it will be better to set this
globally
instead of manually changing access_log line for every vhost :slight_smile:

2012/12/26 Lorenzo R. [email protected]

On Wednesday 26 December 2012 04:26:17 Lorenzo R. wrote:

Thanks Valentin!

access_log /var/www/blahblah/logs/access.log combined gzip; worked :slight_smile:

**Last question: what does the flush variable do? Does it specify for
how much times to keep the logs?

It specifies how long the log lines can be buffered.

See the docs: Module ngx_http_log_module

wbr, Valentin V. Bartenev

http://nginx.org/en/donation.html

On Wednesday 26 December 2012 04:27:59 Lorenzo R. wrote:

Oh, I was forgetting: is there a way to globally set to gzip access_log?
Cause I have a lot of websites and it will be better to set this globally
instead of manually changing access_log line for every vhost :slight_smile:

This settings is set on a per file basis. If you want to change it for a
lot of
access log files, you could use automated editing tools like sed, awk…

wbr, Valentin V. Bartenev

http://nginx.org/en/donation.html