Add-On Domains/Websites

Hello everyone, I am new to Virtualmin and looking for some help.

First off let me start with a little information about myself as to why I am seeking help. I have been using shared hosting and cPanel for about 10 years. I am just starting to make the switch to a VPS and got it and setup Virtualmin.

I am trying to add domains to my Virtualmin install and there is no option to select a document root for the new domains so it wants all new domains/virtual servers to use the main document root for the main domain. There is no option to choose/create a separate new document root for the new add-on domains.

Information I have found here and around the web says there is an option to choose a document root but that isn’t what is showing for me.

I am sure I am just probably doing something wrong but can’t find helpful and Accurate information anywhere.

I am basically trying to do what I have done in cPanel for years and add new domains to my Virtualmin CP while each has their own document root so I can import my existing websites currently on shared hosting to the new VPS server.

If anyone can help me out with good and accurate information it would be greatly appreciated.

Also, I have only basically used cPanel so I am new to pretty much everything else to do with VPS’s and Virtualmin so noob friendly help would be appreciated.

I am an intermediate using cPanel but that’s all I have really known all these years, so sorry for what may sound like a simple question / help request.

Thanks in advance!

| SYSTEM INFORMATION||
|------------------------------|
| Ubuntu 24-04 |
| 7.30.4 |
| ALL ON SAME IP IF THAT MATTERS |

A new server will have its’ own root document in /home/domain.
You can do a sub server that will have a different root document in that domain. Cpanel calls it a sub domain.

1 Like

Each virtual server root is located under /home/
ie
/home/domain1
/home/domain2

so they do have separate roots but they all have to be under home.

What issue do you have with doing it that way?

by this cpanel (or whm) do it the same way.

Sorry I missed the addon, but its still pretty close

1 Like

No it does not.

Every Virtual Server or Sub-Server gets its own document root. You’d have to go way out of your way to convince it to do otherwise (or you’d have to enable the Subdomain server type, which I don’t recommend you use…but, if you restored cPanel backups that had subdomains in it, you’ll get that feature automatically enabled and you’ll see it in the choices for creating a new virtual server…you should just never use that for new domains).

1 Like

@ID10T Thanks for your reply. It seems to be working properly for some reason now. When I first added a domain it was using the main document root (same as domain Virtualmin was installed on). I don’t know why but it’s working fine now with a separate root folder of it’s own.

@stefan1959 Thanks for your reply, it is working now with it’s own separate folder. Didn’t do anything except logout and back in so maybe that fixed it.

  • Joe Thanks for your reply as well. Everything is working properly now and all I did was logout and back in to try that. I don’t know if that was it or if I somehow did something different the other times.

One thing of note is that most information found around the web says you can setup/create/choose your document root when adding a new domain but I never saw that option anywhere. Maybe that is from older versions, I don’t know but the information found out there is out-of-date or something. That is one thing that threw me off.

I look forward to getting to know Virtualmin better. It was highly recommended to me by some long time online friends, but they never have time to help me out. LOL I was told to avoid other CP’s…

Thanks to everyone who replied, you help is greatly appreciated.

That’s never been true of Virtualmin.

I assume you were looking at Webmin documentation, which is not the same (Virtualmin is a module in Webmin, but creating a VirtualHost in Webmin is worlds apart from creating a Virtual Server in Virtualmin). You should not try to follow Webmin docs for creating/managing websites.

Maybe you were confused by having the same default page? Hard to say. I can assure you, logging in and out doesn’t change that behavior.

Root document for what? Domain owner? Web? FTP user/s? The first two are set, well kinda. I think you can configure where you enter for some functions. SSH in for command line vs FTP in for web stuff.

No I was looking at Virtualmin. That is why it was so confusing. There is a lot of information around the web elsewhere as well that is not so beginner friendly.

As soon as I use it more I will start catching up. I just need time to learn things but I am really wanting to get away from shared hosting so this is part of my learning curve.

Well I put up a simple coming soon page (html) for the new domain/website and it was showing on the main VM domain and the new one. That is one thing that threw me off

I recommend you start with our documentation. There’s also a lot of info on the web that is wrong, sometimes dangerously so. There’s a site called “Bob Cares” that is dangerous misinformation. I’m not sure if it’s intentional or accidental or AI-generated, but if you follow the advice found there, you will royally fuck up your system.

That’s a “wrong site shows up” problem, unrelated to document root. Troubleshooting Websites | Virtualmin — Open Source Web Hosting Control Panel

But, also be aware that there is one “default” website that Apache will serve if it can’t find the right match among the VirtualHosts, and what it decides is “the right match” is not very intuitive. You can choose what the “default” site will be…it’s just the first one in the list of VirtualHosts (or on Debian/Ubuntu it’ll be in a file named 000-somedomainname.conf or whatever).

Yes, I am going to start reading more on it. I love reading and learning and that’s on my very soon to-do list. I am trying to move my sites so I don’t have to renew my shared hosting so I am in a bit of a rush and haven’t had enough time to red as much as I should.

Funny you should mention “Bob” because that one was one and I haven’t trusted the information there because a while back I found some seriously wrong information. I guess Bob really doesn’t care! LOL

It’s some kind of blogspam with good SEO. The results there often appear above ours in searches, despite being horrible. It’s not an exaggeration to say it’s dangerous.

Oh, okay. Maybe that was the problem.

I know it’s not an exaggeration. I was curious who was posting some of the stuff I saw on there a while back. That site does show up for a lot of different things in searches. I don’t trust it so I always try to go to the sources myself if possible.