So I thought I had a really great idea: Set up a development webserver on my raspberry pi with an easy-to-use interface for managing websites on virtual hosts. I thought it might also help me learn a thing or two about DHCP & DNS. Oh how naive I’ve been…
I use WHM/Cpanel on my production server to add/manage clients websites, and wanted to have a similar set up on my local network for developing the sites. After a little googling, supposedly this was possible by using Virtualmin, however I could not find any guides on how to accomplish this specific use-case. The only threads in this here forum i was able to find were created by people who seem to know exactly what they were doing but running into very specific problems, and any configurations they may have had to get this to work unfortunately weren’t posted.
Tl;Dr: Is anyone able to help configure a Virtualmin set up which allows the creation of virtual hosts with locally accessible domain names (I’m using ‘.lan’ as a domain). When I set up virtualmin it auto-configured itself to be accessable at ‘raspberrypi’ from any device on my network, I would like this to be the case for virtual hosts I add too.
I’m not sure what you’re asking? Virtualmin doesn’t care about names. You can use a
.lan TLD or any other TLD.
And, it didn’t autoconfigure anything with regard to being accessible on
raspberrypi. You presumably have that name in your
hosts file, or something else is providing DNS resolution that knows the address of the Pi. Virtualmin will answer on any hostname that resolves to the host it’s running on.
If you want local devices to be able to look up the names of domains on your local Virtualmin server, you’ll need to use the Virtualmin system as your DNS server (you could also add them to your hosts file). By default, BIND is configured to not perform recursive queries for anyone outside of localhost, however, so you’ll need to grant access to your local network. There’s some documentation about that sort of thing here: https://doxfer.webmin.com/Webmin/BIND_DNS_Server#Editing_access_control_lists
First of all, I really appreciate the speedy response and from the product co-founder no less!
Perhaps I should rephrase; When I installed Webmin it was automatically configured to be accessible from the raspberrypi’s hostname on port 10000 from any device on the network, no edits to the /etc/hosts file on my client machine necessary.
I also feel i should mention I have set my router’s secondary DNS server to the pi’s ip at 192.168.1.10.
Chill, @unborn. Folks can tinker with whatever they want. We don’t support it (or any ARM system), but if someone wants to do everything manually and do a bunch of reading, I say let’em.