Write to virtual host file from a directory