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@sg ~]# cd /var/log/nginx/
        [root@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,

_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to