Virtualmin as a development environmewnt

SYSTEM INFORMATION
Debian12
Virtualmin current REQUIRED

I’m trying to use virtualmin as a development environment which doesn’t seem to be a priority.

I’m assuming it is gernerally used like WHM. My problem is accessing virtual servers for testing. Is there a way to access webmin of individual virtual servers without running DNS for my LAN?

If there are discussions for this type of use it would be great to know. Also any suggestions in this area would be appreciated.

@newbie001,

You could setup the “hosts” file on your computer to point a domain to your server… This would trick your local system into believing that the domain points to the server.

I develop sites either using a “sandbox” sub-domain if I want customers to see a site before it goes live…

sandbox.customer-domain.com

Or when I’m developing project sites internally I may use a non-existent domain like:

parking.tpn

In the former case, I’d map the “sandbox” sub-domain to a real DNS record, and in the latter case I’d map it using the “hosts” file on my system.

I don’t understand how these two things are related and how WHM would solve it differently than Virtualmin?

@Joe,

I gather he wants to setup Virtualmin domain without pointing the DNS to the domain, such that my answer should get him moving in the right direction.

I believe his comparison was that Virtualmin is like WHM in that it allows you to manage domains. Sounds like he’s coming from the cPanel community.

I toyed with the idea of changing the domain name on virtualmin but put real domain for now. i have used webmin in the past for individual websites but thought i would try virtualmin for multiple websites. does webmin have multiple possible ports? Do Webmin and virtualmin both use 10000? I’d prefer to use webmin for administrative stuff since i know it already but haven’t figured out how to access for each vitrual server.

Yes my production websites all use cPanel and i use WHM as a reseller.

@newbie001,

You could use Webmin directly and make use of the Apache module for managing sites, but generally speaking it’s recommended to use Virtualmin which was designed to make this process easier.

Like I said, you can technically setup “any” domain name you want, it doesn’t have to exist or be pointed at the server via DNS.

But you will need to have a way of mapping the domain. You could technically setup different ports per site, but this would become quite ugly and less efficient IMO.

I have my defaults NOT to request a Let’s Encrypt Cert because I was moving sites first and then making them live. I’d suggest you turn that off as it may cause problems. The software will do a self-signed in its’ place.

Cpanel and WHM have different ports so no confusion about access. Webmin and Virtualmin seem to use same port

They are tabbed. You get both. No worries.

I just don’t understand why this aspect of things would be different?

You need something to do that name mapping. You have many options for development environments. If you want to test locally with the same name, you could add it to your hosts file. If you want a dev environment and a prod environment, you’d have two names. In this case you could add your private address on the dev name and your public IP on your prod name (this is usually what I do). DNS (wherever it is hosted) doesn’t care what addresses you put in the records, they can be private. I do this all the time for VPNs.

You could also make an alias, and give that the private IP. In this case the actual domain name for the Virtualmin account (on your dev and prod servers) could be the same as the prod name, but you would be able to choose which one you look at based on the domain you browse/login to.

But, none of that is specific to Virtualmin. That’s what I’m confused about. Whatever you do with cPane/WHM you almost certainly can do with Virtualmin. I just don’t know what you’re asking to do.

We haven’t built a cPanel/WHM clone. Virtualmin is not equal to cPanel and WHM is not equal to Webmin. Virtualmin does the job of both cPanel and WHM, and Virtualmin is a set of modules for Webmin (plus a bunch of packages, and configuration, etc.).

Oh, are you just asking how to login as a domain owner? Just do that. You don’t need a different port. Just use the virtual server username and password to login, you’ll get that domain account’s UI. You don’t need to browse to any different URL or domain or whatever. Any domain that resolves to your server will work, you can login with any user no matter what domain you used to reach Webmin/Virtualmin.

I’m still trying to figure out how to access webmin for each virtual server. Before i just set up a separate computer for each website under webmin and used IP address to access.

https://domain_name.tld:10000
Each will have what you assigned visibility for.

Ah… I see . great thanks

I use about 5 different browsers daily. You will need to either log out of the main you are using and log in via the domain or use a different browser.

@newbie001,

Further to @ID10T response, you can use “https://any-domain-pointing-at-ip-address:10000” then enter the appropriate username/password and it’ll know which domain you are interested in.

1 Like

Put the real domain / create a virtual server in Virtualmin with the real domain name and then create an alias domain for the virtual server. You have two domains on the same virtual server.

The alias domain could be used for development and testing and then the DNS records of the real domain could be changed when it is ready to go live.

For programming development I use xampp on my Windows PC so I can use xdebug and symlinks.

For normal web development i.e. wordpress I use a full Virtualmin server on my local network with no connection the outside world. I then use split DNS on my router (pfsense). This is a separate virtualmin server. I haver a live one on the same network.

Split DNS is where you set the DNS entry for a website manually in your routers DNS resolution table (other might call it something different) and this stop the need for doing a real DNS lookup from the servers on the internet. You can also just put an entry in your Windows hosts file to do the same thing if you don’t want to setup your router but it is limited to just each PC where you make this setting.

So with this method you can setup a development virtualmin server and use whatever domains you want for development.

I don’t really understand the DNS feature of virtualmin. So…

I am think of running something like dnsmasq on the virtualmin machine that will point browsers on my LAN to that machine as DNS1 when the machine is on. When it is off then I use my ISP DNS as DNS2. Would this work? Not sure if I would point dsnmasq entries to its own LAN IP or 127.0.0.1 :rofl: