views:

95

answers:

1

I want to use wildcards to send the request to any sobdomains to the folder of the domain.please specify how to achieve this in apache2 using the virtual host settings.The domain and its subdomain uses the same IP address. the subdomains cannot be predetermined as they are created by users.

Thanks

A: 

what about this configuration

<VirtualHost *.domain.com:80>
    ServerAdmin [email protected]
    DocumentRoot /var/www/domain
    ServerName domain.com
    ServerAlias domain.com *.domain.com
</VirtualHost>
Sreejith