Bug 996006

Summary: Nginx: Error_log directive does not support variables.
Product: [Fedora] Fedora Reporter: brullek <brullek>
Component: nginxAssignee: Nobody's working on this, feel free to take it <nobody>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: jeremy, pavel.lisy
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-26 18:22:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description brullek 2013-08-12 07:41:24 UTC
Error_log directive does not support variables.

--------------------
# config for virtual host:

server {
        listen *:80 default_server;
       
        set $sitename dev.local;
       
        server_name dev.local devel.local;
        include /etc/nginx/vhost/vhost_param;
}


---------------------
# /etc/nginx/vhost/vhost_param:
 
   root /var/www/vhost/$sitename/www/;
 
    access_log /var/log/nginx/$sitename.access.log users;
    error_log /var/log/nginx/$sitename.error.log warn;
 
    location / {
 
        location ~ \.php$ {include /etc/nginx/fastcgi_params; }
 
    }
 
 
---------------------------


Nginx does not understand the variable $sitename in error_log
and make files:
1. /var/log/nginx/dev.local.access.log
2. /var/log/nginx/$sitename.error.log


The problem is also evident on Centos 6.4

Comment 1 Jamie Nguyen 2013-08-26 18:22:01 UTC

*** This bug has been marked as a duplicate of bug 990837 ***