Posted by smoneyan on March 20, 2013 at 5:11pm
Hi,
I am using nginx 1.1.19. I am using the following configuration for my site.
I don't want to repeat the site name in access_log, error_log, php_log like this
access_log /var/log/nginx/example.com.access.log;
error_log /var/log/nginx/example.com.error.log debug;
fastcgi_param PHP_VALUE "error_log=/var/log/php/example.com.error.log";I am trying this config. But i end up having file names like in my log folder.
$host.error.log.
I know i'm doing something wrong. Could any one of u help me ?
server{
listen 80;
server_name example.com;
root /var/www/example/src;
index index.html index.htm;
#access_log /var/log/nginx/$host.access.log;
#error_log /var/log/nginx/$host.error.log debug;
fastcgi_param PHP_VALUE "error_log=/var/log/php/example.com.error.log";
include denyhost.conf;
include drupal.conf;
}Thanks,
Subu
Categories: nginx config access_log error_log
Comments
Variables do not work
on the
error_logdirective. This directive is provided by the core HTTP module.See: http://trac.nginx.org/nginx/ticket/57
As for access logs it should work out of the box.
thanks
thanks