configless vhost

mike mike503 at gmail.com
Thu Jun 26 12:19:51 MSD 2008


i believe variables are parsed at runtime, and someone just in the
last week or two brought up this too... i could be wrong but i believe
the answer is "no"

but it is something that is useful, i would believe, so it should be
added on a wishlist somewhere (i am still wanting to make that tool
and i am working on it slowly)

On 6/26/08, Marcos Neves <marcos.neves at gmail.com> wrote:
> 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


More information about the nginx mailing list