I have been looking round and I have not found a good way to automatically set the document root for domains automatically.
For example:
In the DNS, *.mydomain.com points to mydomain.com
And in the lighttpd config it uses the host variable to find the subdomain and set the document root to /var/www/servers/mydomain.com/subdomain/dev/index.html
If the domain is dev.mydomain.com.
It would be great if it could support multiple domains e.g. mydomain.com and myotherdomain.com