SYSTEM INFORMATION | |
---|---|
OS type and version | REQUIRED Ubuntu Linux 22.04.3 |
Webmin version | REQUIRED 2.101 |
Simply replace the index.html
file with one of your own. (as always make a backup of it first just in case you change your mind.)
Thank you Stegan, i appreciate.
Am sorry but how do i go about this index html file as that is the current challenge.
I have located the file on my virtualmin software but how to go about editing it as it seems i don’t have the right app to use in editing it?
The index.html
file is a simple text file and can be edited or you can start from scratch in any good text editor on a PC.
You can then use Virtualmin’s FileManager to upload it.
Note this is very basic web design (there must be 1000’s of “how to” design a simple web page on the internet. If you need to do this start simple and work your way up. You are going on very long (and exciting) journey.
Add a new index.html to /etc/skel/public_html/
(or whatever skel directory you have configured).
You should not change anything in the Virtualmin installation directories. Any such changes will just be overwritten next time you install an update.
I guess we should clarify whether you want to edit one such file (one already setup for a domain account in the user’s public_html
directory), which is what Stegan is talking about, or if you want to change the default that is put in place in new domains, which is what I’m talking about with adding a file to /etc/skel/public_html
.
Skeleton dir is also configurable per-Server Template (under Home Directory), so you can have multiple default pages, if you want.
Oops! yes sorry about that assumption. I just read the question and presumed too much.
there’s a default page which is what is above when you go straight into the web address.
I want it to take me straight to the log in page as seen in the image below
Depending on the webserver, you can create a condition so that a request to the website on port 80 or 443 is redirected to port 10000 (Webmin default). RedirectMatch, RedirectCond, … directives in the .htacess file if it is Apache. You can easily find examples by searching the Internet.
Couldn’t be simpler
just add the following to the header of the index.html
<meta http-equiv="refresh" content="0; url=https://your-domain.com:10000/" />
I would stay well clear of .htaccess
or any .conf
file unless you know exactly what you are doing.
I prefer redirections with the help of webserver directives and if I use a load balancer, then I will do it directly in front of the webservers.
Please note there is a typo in your message, h-equiv is actually http-equiv
. For more information
Tx
my thumb got stuck - corrected
Oh and I should also add that this very simple and ancient redirect is “discouraged” by W3C for reasons that really only apply to big modern websites or browsers out of the ark. But as everyone keeps saying replace the default page with a real website even if it is just an “under construction” page. Think about why you need to redirect in the first place. If the user is given access to the GUI then why not give them the url and port (10000)
Redirection must be done with great care. The version proposed by you does not offer control and it is not making a difference between HTTP statuses 301 and 302, this is also the reason why W3C does not recommend it anymore. It is based on the fact that it asks the browser to do a refresh of the page. Honestly speaking, it is a method that I have not seen for at least 20 years.
but it works !
As I said, not to be considered a permanent solution (put a website there!)
It is easier than just tinkering with .htaccess
and .conf
files especially when you don’t have experience of the problems it might create.
I still do not see why the OP cannot just give the user the correct url (it is just a port number) if the user is knowledgeable/trusted enough to use Virtualmin then they can us a port number.
You can put anything you want in your own default page. There are literally no restrictions imposed by Virtualmin on what you put in /etc/skel/public_html/index.html
. If you want it to be a redirect, make it a redirect (that seems confusing, to me, without a little explanation, though…I think your users would be better served by a little bit of explanation of how to replace the default page with their own content, etc.).
This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.