XAMPP broke - use Webmin's Apache2 and export my MySQL data?

Hi All, and first of all thank you for Webmin. It appears to be a godsend upon cursory inspection.

My pickle is hopefully pretty simple. After losing my only Windows 11 - capable machine, which in my unbelievable stupidity was housing about 8Tb (i.e., most) of my data via Storage Spaces, I finally have everything moved over to an old-ish laptop running Ubuntu 22.04. Unfortunately, that laptop must also house my webserver, which was also ported over from the Windows box. After figuring out how to move my htdocs to an external RAID setup, it’s up and running. Or was until I installed Webmin lol.

Since my main storage device is no longer using Windows software “raid”, I figured installing Webmin was a good idea in order to confidently schedule backups, as well as help my Windows-brain navigate the Linux staples (Samba, Remmina, chmod/chown etc.). I probably should have paid more attention when I installed Webmin; maybe I could have told the installer I already had Apache2 up and running elsewhere?

So, in a nutshell, my question is: how should I go about re-engaging my htdocs with Webmin’s Apache2 installation? Would it be easiest to just export all of my databases, delete XAMPP, install MySQL/Mariadb as a standalone and use the documentation to figure out how to get Webmin seeing my htdocs? The entire website references my domain name, unfortunately, not localhost. I’m snooping around the Webmin directories for something resembling a VirtualHost file, but TBH everything is a bit of a blur right now after the disastrous month I’ve had in regards to all of this.

I’m sure I’m not the only Windows idiot who can’t figure out how to unbreak a webserver after installing Webmin…which I really do want (need) to keep using.

I’d greatly appreciate any help in breaking down the complexity here. And in the meantime I’ll keep snooping around for a VirtualHost file to see if that re-establishes the connection to my htdocs.

Thanks kindly for any help,

OS type and version Ubuntu 22.04
Virtualmin version Webmin 2.021


The best solution would be is to use Virtualmin (Webmin module) to handle your VirtualHosts (virtual servers).

Thank you, Ilia.I will look into that. I was almost successful yesterday with the Webmin Proxied Through Apache setup, but ultimately I could not get past the “this page ain’t secure so you can’t come in” using localhost or “mydomain. com”, either webmin.mydomain. com or mydomain. com/webmin.

Since I am dealing with a brand new setup which I am not yet committed to, wouldn’t it make the most sense to uninstall Webmin and XAMPP (since my htdocs are on a separate external RAID array via USB3), clean up the uninstall remnants, then reinstall Webmin with a VirtualHost to my document root and domain name, and install PHP and MySQL/MariaDB (and import my data from my exported .sql files)?

To be clear, this computer is only meant to hold my webserver and to be home for all of my data which will be shared to the rest of my network (2 Ubuntu boxes and 2 Windows boxes in total) where I am the only user.

So this box needs to:

  1. Securely hold and share out (just to me) my data
  2. Run backups on that data
  3. Allow internet access to my htdocs folder via mydomain.com

Hopefully I can run mydomain. com via https --which I was never able to get working in Windows but which I believe is much simpler under Ubuntu with LetsEncrypt and Certbot…or is that something Webmin can also manage?

With that in mind, should I start with a fresh install of Webmin, then install PHP and MySQL, and configure everything with Webmin from there?

It would be very nice to just log in from my LAN to webmin.mydomain. com and configure literally everything (data backups, folder shares, ownership & privileges, htdocs access) from there…

The only thing you should do, is to take the clean server, without any preinstalled software and just run sh virtualmin-install.sh script.

Yes, should never be a problem, particularly with Virtualmin.

Yeah, this is what Webmin and Virtualmin are made for.

Thank you, Ilia. Just what I was hoping to hear. In your experience/wisdom, would it be worth the effort to install Ubuntu Server instead of the usual Desktop configuration? I would call myself a Close-to-Intermediate level user with Linux and don’t mind following a bunch of tutorials to get Server up and running, but I am by no means an expert with Linux. Does Server offer any must-have options over Desktop when run in conjunction with Webmin?

Again, it’s one person, 4 computers, one of which (this one) will function as a webserver and as home to all of my data, to be shared to the other 3 computers, accessed only by Remmina/RDP/SSH once installed.

I just downloaded Ubuntu Server 22.04 in case you say yes lol:)

Setup is easy, just follow the docs on a clean system. Maybe just a update first sudo apt update to get current packages updated.

It installs webmin, so don’t worry about that.

OK so…I installed Ubuntu 20.04 Desktop on a freshly formatted SSD and ran the Automated install per your link, and everything went perfectly with no errors.

However, I was stumped at the FQDN part, even after some reading-up on the subject. I chose “computername.mydomain.com” as the FQDN, but I’m a little worried because mydomain.com is actually the real domain for my website which points to my IP. It has no mailboxes attached to it, though. So can I now proceed to import my databases to the included MariaDb package and point Apache to the location of my htdocs now? Or did I screw up with the FQDN?

That fine, I used server.mydomain.com.
then create my first Virtualserver called mydomain,com

Perfect, thanks Stefan. I really only need to do 3 things with this computer, and then I can tuck it away and access it via RDP/SSH or a URL when needed. So, before I go screwing things up by adding software and blindly tweaking things I don’t understand, are these following operations all possible with Virtual/Webmin:

  1. Set up access to the attached USB storage. I have a 4-bay 16Tb software-RAID10 enclosure(*), and a 5-bay enclosure housing my website on two large (hardware) RAIDed SSDs, with three other 1Tb HDs for backup. I need to access all of this data on 3 other computers.

  2. Install PHP for my website.

  3. (Hopefully) Is it possible to point the MariaDb installation to my RAIDed SSDs by importing my sql files and then moving the pertinent files/folders there and modifying the configuration so it knows where these data files/folders are? In other words, I want to move my sql data off the operating system drive.

I will make sure the 3 other computers have FQDNs with the same schema (computername. mydomain. com) and, as always, give them static IPv4 addresses. I will also make sure that all 4 computers have the same username/password since I am the only user.

(*) On another computer, I am using mdadm and currently building the array which, it seems, will take 3-4 more days to complete before I can shut down and move the enclosure to this computer, so my fingers are crossed it will work:)

I will wait for your response because the only way I know how to do shares is with Samba by adding a [sambashare]. I will install PHP from THIS tutorial unless you say differently, and I will take a stab at editing the my. ini file (or its equivalent) to try and move my data from the OS drive once I have imported my data, also unless you say differently.

You shold not need to do that if you installed virtualmin via the installer mentioned above as all that is necessary will be installed

Very good to know, thanks jimr1. For now, I’ll follow the wizard and start reading the docs and forum.