The joys of setting up a server

Virtualmin install script runningThis is for my MMO game. I need a backend server, so yesterday I signed up for a vps service. I picked Ubuntu 20.04 LTS which I’ve used before and received the login details. I use Putty to log in via SSH and WinSCP for browsing, copying files.  Installing Apache2 is actually very easy. Likewise PHP. I didn’t install MySQL which might have been a mistake, so I had a LAP system (Linux, Apache, PHP) rather than LAMP.

What I did do sensibly was pay for a backup snapshot service.  When I logged in first I did an sudo apt update then upgrade. Then I took a snapshot.

And I needed it. My exact configuration was Apache 2.4 with PHP 7.4. Apache worked when I tested it but PHP didn’t. Well from the command line the PHP command worked and I could see the version but it didn’t work with Apache.  I created a PHP script with phpinfo in it but instead when I browsed to it, it downloaded the script rather than ran it.

This is usually the case that httpd.conf needs some AddType statements only there isn’t an httpd.conf anymore in Apache 2.4. I did locate a mime.conf but adding AddType into that and restarting Apache made no difference. I eventually wasted about three hours on it yesterday. However in my searches I came across mention of Virtualmin and so today I restored to the snapshot and ran the Virtualmin open source script. Luckily Ubuntu 20.04 LTS was one of the supported distros and Virtualmin installed without a hitch. It’s very impressive. The screenshot is of virtualmin installing. Thankfully all the bars on the right were green…

Back about 12 years ago when I first started experimenting with Linux and websites, i came across Webmin and used it extensively. Virtualmin installed both WebMin and Usermin. It has changed substantially in the time since I last used it. It surprised me a little because for years Ubuntu and Webmin didn’t seem to get on and Ubuntu recommended not to install it.

Anyway I now have a server that runs PHP. The backend will be running .NET Core once installed, but it’s just as easy to use Apache and PHP for receiving order files (from mobile). PHP is just to simplify getting those files onto and off the server.

(Visited 29 times, 1 visits today)