temporary index page

4 posts / 0 new
Last post
#1 Tue, 07/17/2007 - 15:38
mike

temporary index page

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?

Tue, 07/17/2007 - 16:41
BossHog

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

Sun, 06/07/2009 - 07:13 (Reply to #2)
Joe
Joe's picture

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!

Wed, 07/18/2007 - 01:49
mike

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.

Topic locked