Create a new default index.html template

SYSTEM INFORMATION
OS type and version Ubuntu Linux 22.04.4
Webmin version 2.105
Virtualmin version 7.9.0

Hi,

I want to use a different index.html page when creating new virtual server and followed the insructions on this page:

I copied of the default index.html to /etc/skel/public_html and then edited to remove the login information and button (that shows the Virtualmin port number).

Also, I set the /etc/skel/public_html directory in both:
Virtualmin > Systems settings > Server Templates > Default settings > Home directory
Virtualmin > Systems settings > Server Templates > Settings For Sub-Servers > Home directory

But every time I create a new virtual server I still get the old index.html.

Can anyone please help?

Thank you!
Ugo

You shouldn’t change it in Templates like that. In fact, it should be set to /etc/skel for it to work the way you expect it.

yes I placed my index.html /etc/skel at he beginning but, still, the proper index.html was not copied even from there.

anyways I now tried to copy my index.html to /etc/skel and then edited the path in both:
Virtualmin > Systems settings > Server Templates > Default settings > Home directory
Virtualmin > Systems settings > Server Templates > Settings For Sub-Servers > Home directory

to:
/etc/skel/

note: originally it was set without the trailing slash (/etc/skel)

then it worked!

So I thought there is a problem with the default settings in:
Virtualmin > Systems settings > Server Templates > Default settings > Home directory
Virtualmin > Systems settings > Server Templates > Settings For Sub-Servers > Home directory

as they need to include the trailing slash.

Then I edited both values to:
/etc/skel/public_html/

recreated the server but the index.html is not copied :–(

Then I edited both values to:
/etc/skel/

recreated the server and the index.html is properly copied.

So I guess there is probably a bug in the code as this behaviour is really strange.

If you like I can give you access to the panel, this is just a test server I created to test Virtualmin before I adopt it, so you can see by yourself.

Anyways this is a brand new installation on a freshly created server, so it should work as expected.

Thank you

I just realised that, when I set:
/etc/skel/

in:
Virtualmin > Systems settings > Server Templates > Default settings > Home directory
Virtualmin > Systems settings > Server Templates > Settings For Sub-Servers > Home directory

the index.html is copied from:
/etc/skel/public_html/

So this is a bit confusing and maybe need an explication text on the server templates pages.

Also, it should work with both:
/etc/skel

and:
/etc/skel/

set in the server template pages.

Do you agree?
Am I missing something?

Thank you

/etc/skel is relative to user home directory.

Yes, and it does.

I think we already have a help tip for it, e.g.:

guess I now understood how this works.
thank you for your help

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.