Setting up a webserver like it's not 1999
So to follow along at home with my website like it’s 1999 series you’ll need a webserver like it’s not 1999. A genuine 1999 webserver would last about 15 minutes on the modern internet.
To set up your own server you’re going to need some degree of experience with UNIX-like systems, DNS, and domain management. I’m not sure if there are many tutorials on this out there, I learnt them a long time ago.
I’m using a virtual machine on my home server, because I’m the sort of person who has a home server. But here’s what I did:
Create a virtual machine to run the server
You could use whole physical machine if you have one handy. I created a VM with 12GB of disk space, 512MB of RAM and 1 vCPU.
An ISP would be able to afford a system with more disk space than this in 1999, but a single core of my 3.5Ghz Intel core i5 4690 would far outclass anything an ISP ran in 1999, even if it is 10 years old at this point.
Install FreeBSD 14.1
Why FreeBSD? I remember it being quite common at the time, and the first UNIX-like server I had a shell account on was FreeBSD. Linux was already well established in 1999, but a lot of the people still regarded it as an upstart that still needed to prove itself. FreeBSD is actually younger than Linux by a couple of years, but its BSD heritage gave it more weight in some opinions.
Also for this series I feel being slightly foreign to most people is an advantage.
I’m not going to include a guide for the installer, the FreeBSD website has documentation.
You can also run Linux, Alpine has everything we need available.
Create a non-root user
useradd my_user
. Just remember to add it to the wheel
group so you can use su
when you SSH in.
Install critical administration utils with pkg
Yes I could use ports, but pkg is good enough.
pkg install vim
Install Apache httpd
pkg install apache24
I’m using Apache despite there being more modern options that are probably better for almost any other use, like nginx and lighttpd. However Apache still supports cutting-edge 90s features that most other servers have removed or never supported, like server-side include processing, CGI script support, and .htaccess
support for per-directory configuration overrides. These will come in handy.
Configure Apache
In /usr/local/etc/apache24
edit httpd.conf
and uncomment the LoadModule
lines for include_module
and userdir_module
. Also uncomment the line Include etc/apache24/extra/httpd-userdir.conf
.
Done!
Yep, that’s pretty much it. The root site is in /usr/local/www/apache24/data
.
What’s missing?
SSL
For that true 1999 experience SSL is terminated outside the web server. An ISP in 1999 wouldn’t offer SSL as standard, it used a lot of CPU and required a dedicated IP address per domain name (mostly).
If you’re following along you should use Let’s Encrypt and certbot to configure SSL for you.
Firewall setup
You should think about this, especially if you’re intending to allow other users access to your server. You probably don’t want random servers running.
Things I may add for the future:
- Email hosting, SMTP and local delivery at least, probably not IMAP or POP3 unless I move it off my home server.
- A database, probably PostgreSQL. I know MySQL was more favoured at the time, but I prefer Postgres.
- Perl and python modules as required to run the demos I have planned.
Comments
Post a comment