These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for temporary index page on the new forum.
im curious to know, how easy it would be to have virtualmin put a temporary index.html page into public_html when it creates a site and also have it replace a variable with the domain for that site? and how would i go about doing this?
Hi mike,
is the "skeleton" directory what you are looking for?
When you create a Server Template, it can load files in /etc/skel or /etc/skel/<fakedir> automatically on domain creation. So if you put your own custom index.htm in the above dir, it will be the default home page on new domain/server creation.
Was this what you were looking to do?
Good luck.
Joe
Sounds like skel is exactly what he's looking for, Joe. ;-)
You can also enable variable substitution on the copied files. Browse to the Server Template(s) that you use, and have a look at the Home directory section. There you'll find two options: "Skeleton directory for files", which allows you to choose the directory that is dropped into place on domain creation; and "Substitute variables in contents?" which allows you to enable variable substitution. The list of available variables is the same as for almost every other area in Server Templates. ${DOM} is the one you're looking for, probably. Those variables are documented here:
http://www.virtualmin.com/documentation/id,server_settings_and_templates/
Though I think a couple of new ones are missing...I'll fix that.
--
Check out the forum guidelines!
all right, thanks for the responses, and yes, that is exactly what i was looking for, I was sure that it could be done just how you explained it because other control panels i have used have done that, i just wasnt sure if it was incorperated into virtualmin :D now that makes me a bit happier, i should dump those tmp index files into that directory and reconfigure things.