Done on my Ubuntu 10.04 it will work on other server images too. The proper way how to install the subdomain is to treat subdomain as a regular domain Go to the menu "Sites" and create main site and as many sub domains as you want. Follow the ISPConfig3 protocol. Each site must have "Auto-Subdomain" set to [*.] so the ISPConfig3 will insert the directive "ServerAlias *.domain.com" in the Ubuntu's "sites-enabled" files. Save the Sites You must manually edit "sites-enabled" feles as followes: Code: domain.com = Site 1 ServerAlias domain.com sub-1.domain.com = Site 2 ServerAlias sub-1.domain.com ...... ...... ...... sub-n.domain.com = Site n ServerAlias sub-n.domain.com The main domain [B][U]must NOT contain [*.][/U][/B] but it may have list of www.domain.com, ftp.domain.com, mail.domain.com etc. That is all you need to do in the Ubuntu's sites-enabled directory of above files. [U]Save the files[/U] Restart Apache2: ~ /etc/init.d/apache2 restart Then select the "DNS Zone" menu and "Records" tab. For each sub domain add "CNAME" and "A" record i.e. "sub-1" as shown above. Follow the ISPConfig3 instructions to do that. Wait up to 48 hours. Keep checking that your sub domains deliver same DNS info as your main domain here http://network-tools.com/ You are done. Now every sub domain have same features and same file structure as the main domain. The ASPConfig3 feature "Subdomane for Website", to subdomain redirect, is illogical ad should be removed in the next update. Enjoy -Stan
If you want to have a domain like sub.domain.com as separate vhost, simply click on the new website button, enter sub.domain.com into the domain field and click on save. No manual editiong of any files or symlinks needed. The subdomain feature that you mixed up here with the creation of websites is not illogical at all, its a feature requested by many proffessional ISP's which offer their clients free subdomains that work as aliases.
Unfortunately that is not correct because you must enter name of subdomane into ServerAlias directive. Since you do not support such feature it must be done manually. "Auto-Subdomain" supports only 3 predefined choices which is insufficient. Code: <VirtualHost *:80> ServerAlias domain.com, or www.domain.com #(your choices) </VirtualHost> # <VirtualHost *:80> ServerAlias sub.domain.com #(must be manually edited) </VirtualHost> #----- The above will work but the following will not work ------ <VirtualHost *:80> ServerAlias *.domain.com, or nothing #(your choices) </VirtualHost> # <VirtualHost *:80> ServerAlias sub.domain.com #(must be manually edited) </VirtualHost> Maybe it is me but I do not see any practicality in rewriting subdomane if the CNAME was created for subdomane purpose. You can provide free subdmains too and domains can be aliased via the ServerAlias to your domain too. I should add that in rewriting you cannot assign mailbox because the subdomain does not exist externally and the entire file structure is a mess.