Apache subdomain

Good day! Apache subdomain

I'm having some difficulties with my apache config.

We need:
sub1.domain.com to go to /var/www/domain.com/html/sub1
sub2.domain.com to go to /var/www/domain.com/html/sub2
sub2.domain.com to go to /var/www/domain.com/html/sub3
etc ..

Don't want to be doing this using * for serveralias, nor
.htaccess / mod_rewrite things.

I have another domain, where the virtualhost section like below is working perfect.
But.. somehow this one aint working.

I personaly never saw the usage of %-3 before, and its hard to find anything about it, most likely due to the "%-3" characters, wich are hard to search on using a search engine like google.

<VirtualHost 11.11.11.11>
ServerName %-3.domain.com
ServerAdmin admin@domain.com
UseCanonicalName off
VirtualDocumentRoot /var/www/domain.com/html/%-3
CustomLog /var/www/domain.coml/logs/www.domain.com-access_log combined
# ErrorLog /var/www/domain/logs/www.domain.com-error_log
ScriptAlias /cgi-bin /var/www/domain.com/cgi-bin
</VirtualHost>

Anyone got any tips, idea's.. docs? Apache subdomain

thanks!

 

 

 

 

Top