|
|||||||||||||||||||||||||||||
« About the Site / Self HostingSelf Hosting I sometimes see the phase "proudly hosted by [whoever]" on websites. In 2025/26 it became apparent to me that, given changes across the hosting industry in general, shared hosting was no longer the best solution for hosting X-Bomber the Game. Large File Area I started the Large File Area project in August 2025, when Krystal Hosting started to throw its weight around with us and there was a series of serious communications breakdowns with the support and customer service. I found out about XAMPP, which is a single-install webserver for Windows, that gives you Apache, PHP, MariaDB among other things. Even with that running, it didn't look as though it was going to be possible, in anything like the near term, to get the whole site running from a home server, so initially, I created a "large file area" that was linked to from the site's right-hand menu. Another step forward was to use Dynu DDNS client to handle IP changes and update DNS as required.
Originally, the LFA used Apache's auto-indexing with a whole series of adaptations to present video files and downloads that were too big to host practically on shared hosting and still be able to back them up locally. It didn't take very long after that before I was able to retrofit the code for the LFA so that it had feature parity with the site. Main Site Migration One motivation for developing the LFA has been the vastly increasing cost of storing any decent amount of data on shared hosting. With shortages of memory, storage and compute components only continuing to worsen, I can see costs of shared hosting increasing even further. To prepare to migrate the content of the main site across to the LFA home server, it made sense to have Dynu handle the xbomber.com domain and point it towards the home box. The next step was to enable the MariaDB service and migrate some of the databases from the main site to the LFA server. The "Other" section of the site was migrated across so that I could see how well XAMPP would handle serving that section. Hardware ConfigurationIt's a bit of a coincidence that my home server got called "Crystal" back in 2012, as it's Krystal Hosting that's done my webhosting since 2003. At the time when I built Crystal, xbomber.co.uk was hosted on Peter Lewis' gibbering.net, which was an offshoot of the illicitdev project. It wasn't until 2014 that the site went back to Krystal hosting. Crystal was named after Crystal Kane from Centurions. Network ConfigurationOur router is just an ISP-supplied one, but it does have the option under its 'advanced' settings for DMZ mode, where you specify the IP of a machine on the local network and the router will forward requests over port 80 and 443 to it. With the house being big and old, Wi-Fi doesn't work in every part of it, so we use Netgear Powerline to connect a Netgear extender and the XAMPP server. Software Configuration
Crystal runs XAMPP, which provides an Apache server for file-serving, PHP for server-side scripting and MySQL/Maria DB for databasing. It also gives you FTP and a few other helpful features, such as phpMyAdmin for DB maintenance. The XAMPP sits on the machine's M.2 drive so it should always respond quickly. XAMPP and Dynu client start automatically as services in the event of a system restart. XAMPP kicks off the Apache and MySQL services on start-up. So it should recover nicely if Microsoft decides to spring further updates on Windows 10. DDNS and SSL
To compensate for occasional changes to the router's external IP, the Dynu client runs on the box to check the external IP and update Dynu's nameserver records for xbomber.com and crash.ddnsfree.com to point to the new IP, if needed. Dynu also helps you to create certificate authority-signed SSL certs for domains that it manages. That way, you won't see any privacy warnings in the browser. The below article makes adding the CA-signed to XAMPP nice and straight-forward: XAMPP SSL Configuration and Installation Guide for Windows Data ProtectionDatabases
Backing up and restoring the files that make up a live database isn't possible. SQLBackupAndFTP, is a great utility that triggers the mysqldump.exe to export the MySQL databases. The free version can export two databases. Once the hostname, credentials and the mysql\bin path are set, if you encounter error [DBMS-MSSQL:11006#11007], set the "Generate Statistics Histograms" parameter to "Yes" under the "More settings" dialog. Mirroring
With the databases having been exported to disk and made application-consistent, FreeFileSync mirrors the whole xampp directory, containing the whole XAMPP configuration and the htdocs directory, from OS volume to the machine's three capacity spindle disks, as well as thumb drives, which I keep in some safe locations. This way, there is certain to be a full mirror of everything that's needed that can be restored by copying whole directories in Windows Explorer. ArchivingMirroring the data every 24hrs doesn't help if you need to restore a file to how it was prior to when the mirror copy was taken. Given that Windows File History is free and built into Windows and it works, I use that for archiving. Performance To try and make sure that the site wasn't going to hit any performance bottlenecks, I tested the site over lot of different networks and VPNs to test the parts of the site that are hosted from home and they would always run quite snappily. This was done over the course of a number of months which was important to get a good series of samples. Log Retention By default, Apache's access logs build up in a single file that just grows and grows and can get quite big: even on a server that's not that busy. Managing this is a two-step process. For the first step, you can replace the lines containing "ErrorLog" and "CustomLog" in httpd.conf with something like the below, which uses the rotatelogs.exe to break the logs down into individual daily log files (86400 seconds = 24 hours). ErrorLog "|C:/xampp/apache/bin/rotatelogs.exe -l C:/xampp/apache/logs/error_log.%Y-%m-%d.log 86400" CustomLog "|C:/xampp/apache/bin/rotatelogs.exe -l C:/xampp/apache/logs/access_log.%Y-%m-%d.log 86400" combined Additionally, the following needs to be set in extra/httpd-ssl.conf, otherwise stuff will still get written into the default file locations: ErrorLog "|C:/xampp/apache/bin/rotatelogs.exe -l C:/xampp/apache/logs/error_log.%Y-%m-%d.log 86400" CustomLog "|C:/xampp/apache/bin/rotatelogs.exe -l C:/xampp/apache/logs/ssl_request_log.%Y-%m-%d.log 86400" \ Once this is in place and you see the log data being saved into individual files, you can create a .bat file containing something like the below and have it run from Task Scheduler every day. ForFiles /p "C:\xampp\apache\logs" /m *.log /d -90 /c "cmd /c del @path" The same method is handy for clearing up Sphider logs, which are saved in HTML format in Sphider's admin/log directory. ForFiles /p "C:\xampp\htdocs\sphider\admin\log" /m *.html /d -30 /c "cmd /c del @path" Search Indexing In general, it was easier than expected to get Sphider working on a Windows box but I found getting it to index on a schedule on Windows a bit tricker. cd C:\xampp\htdocs\sphider\admin c:\xampp\php\php.exe spider.php -all Milestones
|
OtherAbout the Site Games - Babylon 5 Into the Fire Ships - AS-5 Proteus TV Shows - Dan Dare Quick Links | ||||||||||||||||||||||||||||
|
This site and content is unofficial; © 2002-2026 Piers Bell and other authors. Star Fleet, X-Bomber et al. © Enoki Films. |
|||||||||||||||||||||||||||||