custom access_log per location /
Jim Ohlstein
nginx-forum at nginx.us
Wed Sep 9 05:59:02 MSD 2009
houseofmore Wrote:
-------------------------------------------------------
> Hello,
>
> Just wondering if there is support for custom
> access logs per directory for a virtual host.
>
> Eg:
>
> location /api/ {
> access_log
> /var/log/nginx/api-access-log;
> }
>
Yes. access_log directive can be in http, server, or location.
See http://wiki.nginx.org/NginxHttpLogModule.
>
> Nginx seems to create the log file, but never adds
> to it.
Perhaps a permission issue? Do the worker processes have write permission to the file?
>
> Cheers!
> -J
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,6055,6061#msg-6061
More information about the nginx
mailing list