﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	uname	nginx_version
67	access_log with variables in filename does not work	Andrey Lyarskiy	somebody	"Original config:
log_format  combined_time '$remote_addr - $remote_user - $proxy_host $upstream_addr [$time_local] '
                          '""$request"" $status $body_bytes_sent $request_time';

server {
...
access_log  /var/log/nginx/$host.access.log  combined_time;
...
}

Nginx does not creating new log files, and does not write logs access logs at all.

Changing to:
access_log  /var/log/nginx/testing.access.log  combined_time;

Log file successfully created.

Changing to:
set $site test1;
access_log  /var/log/nginx/$site.access.log  combined_time;

And again no files created and no access logs at all.

# getenforce 
Permissive

Nginx installed from RPM (http://nginx.org/packages/rhel/6/).
OS - Scientific Linux 6.1 x86_64"	defect	closed	minor		nginx-core	1.0.x	invalid	access_log		2.6.32-71.el6.x86_64 #1 SMP Fri May 20 03:51:51 BST 2011 x86_64 x86_64 x86_64 GNU/Linux	"nginx: nginx version: nginx/1.0.10
nginx: built by gcc 4.4.4 20100726 (Red Hat 4.4.4-13) (GCC) 
nginx: TLS SNI support enabled
nginx: configure arguments: --prefix=/etc/nginx/ --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6 --with-cc-opt='-O2 -g'"
