configless vhost

Marcos Neves marcos.neves at gmail.com
Thu Jun 26 11:26:54 MSD 2008


I have virtualhost with configuration less feature that works like a charm!

    server {
        server_name _;
        set $host_without_www $host;
        if ($host ~* www\.(.*)) {
          set $host_without_www $1;
        }
        root /var/www/$host_without_www/;
        access_log logs/$host_without_www.log;

unfortunately, access_log don´t parses variables, so a file named
$host_without_www.log
is created instead.

There´s any way to keep access logs separated by host, without need to
configure one by one by hand?

-- 
Marcos Neves
+55 44 3263-8132
+55 44 9918-8488
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20080626/e75a78fa/attachment.html>


More information about the nginx mailing list