subdomains

I’m new to Virtualmin. I have my dns already setup on another server and am not quite ready to move it over so I just created a virtual domain for testing.

So, I login to the account to check things out. Well, in my case I have a www.domain.tld and domain.tld that need to have a generic place holder directory/index file but dev.domain.tld linked to another folder. Would I really need to have 2 accounts for this or can it be setup under the one account?

Thanks,
Steffan

Ok, I see, maybe I’m wrong, but you need to create a subdomain from the virtualmin root account. Ok, fine and dandy but I see in the /home/site that it creates a domain folder. Why not put a default folder int here and not just the sub.domain.tld folder? If I move the www into the domains folder and change the path to it, will it screw with awstats etc?

Thanks,
Steffan

Well, I think I am slowly getting it but it seems that if you create a new domain/account it should setup the apache directories in /home/account/domains/www since subdomains are in /home/account/domains why not put the main in there. I edited the template to do this but it’s not working as I’d thought it should. Sure, the apache directives are right but the directories are not created to match the apache config.

Example:
ServerName ${DOM}
ServerAlias www.${DOM}
DocumentRoot ${HOME}/domains/${DOM}/public_html
ErrorLog /var/log/virtualmin/${DOM}_error_log
CustomLog /var/log/virtualmin/${DOM}_access_log combined
ScriptAlias /cgi-bin/ ${HOME}/domains/${DOM}/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory ${HOME}/domains/${DOM}/public_html>
Options -Indexes +IncludesNOEXEC +FollowSymLinks
allow from all
AllowOverride All

<Directory ${HOME}/domains/${DOM}/cgi-bin>
allow from all

After playing with the template, it’s working all except the cgi-bin folder. Where can I configure where to put that folder? I’m not seeing it in the template.