Subdomains

Hello,

You can do that with the templates system already.

Related to this guide:
http://help.directadmin.com/item.php?id=2

except only copy the "virtual_*sub.conf files.
Change the docroot around as required for subdomains.

Then create the:
/usr/local/directadmin/scripts/custom/subdomain_create_post.sh
and insert something like:
Code:
#!/bin/sh
DOMAIN=$home/domains/$domain
if [ ! -e "$DOMAIN/subdomains" ]; then
     mkdir $DOMAIN/subdomains;
     chown $username:$username $DOMAN/subdomains;
     chmod 755 $DOMAIN/subdomains;
fi
mv $DOMAIN/public_html/$subdomain $DOMAIN/subdomains/
exit 0;
save the subdomain_create_post.sh, and chmod it to 755.

John
 
well i do that.. which the second step?.. how i can save this changes?.. Does this script apply current users?

I'm beginner.

:(

Regards
 
Last edited:
From that point on it'll make the change for all new domains. It will NOT change current domains.

Jeff
 
do i need to restart my directadmin panel to apply this changes?
 
Back
Top