Creating a custom index.html for new subdomains


Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"


Top Level » DirectAdmin

Creating a custom index.html for new subdomainsLast Modified: Jan 31, 2008, 3:01 pm
Since there is no template for the subdomain index.html (will likely change), you can still create your own index.html files for them, but you have to use the subdomain_create_post.sh file.

Create:

/usr/local/directadmin/scripts/custom/subdomain_create_post.sh

In it, put something like:

#!/bin/sh
INDEX=/home/$username/domains/$domain/public_html/$subdomain/index.html
rm -f $INDEX
cp /your/custom/index.html $INDEX
chown $username:$username $INDEX
exit 0;



Then chmod the subdomain_create_post.sh to 755.
Obviosly, change /your/custom/index.html to whatever you'd like.

© 2018 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST