VirtualDocumentRoot with 1.4.2
Kai Hendry
hendry at dabase.com
Tue Aug 27 08:43:12 UTC 2013
Hi there,
I've tried to replicate my Apache VirtualDocumentRoot /srv/www/%0 to
nginx.
I have http://dabase.com/e/04055/ with
server_name ~^(?<vhost>.*)$;
root /srv/www/$vhost;
access_log /var/log/nginx/$vhost.access.log;
However it's still logging to /var/log/nginx/access.log instead of
/var/log/nginx/$vhost.access.log.
[root at sg ~]# cd /var/log/nginx/
[root at sg nginx]# inotifywait -r -m .
Setting up watches. Beware: since -r was given, this may take a while!
Watches established.
./ MODIFY access.log
./ MODIFY access.log
`root /srv/www/$vhost;` works, but not `access_log
/var/log/nginx/$vhost.access.log;`.
What am I missing?
Could my configuration upon http://dabase.com/e/04055/ be otherwise
improved, without breaking it into individual server blocks?
Many thanks,
More information about the nginx
mailing list