Location based access log

houseofmore nginx-forum at nginx.us
Fri Aug 5 19:17:53 UTC 2011

Hi all.   I'm trying to log request to a specific directory to an
alternate access_log.  The docs suggest the access_log can be specified
in the http, server, or location level.  eg:

server {
     access_log  /var/log/nginx/access_log;
    location /api/ {
         access_log /var/log/nginx/api.access_log;

In my case, everything is logged the main access_log, and although the
file gets created for the api.access_log, nothing gets logged to it.

Am I missing something?

Thanks in advanced.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,213438,213438#msg-213438

More information about the nginx mailing list