I configured several virtual hosts in nginx 1.0.14 using regular expression, and configured dedicated access log for every hosts in /var/log. but the following error message is always displayed in nginx-error.log.
The following is the core code in nginx.conf
Anybody can help me?
2012/09/02 21:03:28 [crit] 846#0: *70 open() "/usr/local/etc/nginx//var/log/cdxmlxx.com-access.log" failed (2: No such file or directory) while logging reques
The following is the core code in nginx.conf
Code:
server {
listen 80;
index index.php index.html;
server_name ~^(www\.)?(.+)$;
set $www_root /usr/local/www/$2;
root $www_root;
set $access_log /var/log/$2-access.log;
access_log $access_log;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
include fastcgi_params;
}
}
Anybody can help me?