I wanted to know if there was a neat playbook or tutorial set that one can refer to if they’re trying to set up their own static website from home?
So far I have done the following:
- Got a raspberypi (Raspberry Pi 2 Zero W) and raspberrypi OS installed with fail2ban ready.
- Installed nginx (I have not configured anything there).
- Written the HTML and CSS files for the website.
- Purchased a domain.
How do I complete the remain pieces of this puzzle?
My purpose: I want an online profile that I can share with my colleagues and clients instead of relying on LinkedIn as a way to connect. Eventually, I will stop posting on LinkedIn and make this my main method of relaying information and disseminating my works and services.
I get your point in general, but I think some points are odd.
For example, Apache overly complicates a simple task. A web server is simple, the only moving parts in a web request are:
You can learn the details of HTTP in about 15 minutes on Wikipedia, whereas you probably won’t get past the introduction in Apache docs in that time. It’s like learning to drive on a big rig with double clutches. Why do that if you don’t need to?
With a typical self-hosted setup, you can keep it simple and only have your webserver handle the first and pass the rest on to the relevant service. You’re unlikely to need load balancing, malicious request detection, etc, you just need to trunk TLS and route things.
You’re not gaining anything by learning a complex tool to accomplish a simple task.
I’m a developer and I’ve written tons of web servers, and I see zero point in apache or even nginx for a home lab setup when I could (and have) write a simple reverse proxy in something like Go in about 30 minutes. It’s easy, handle TLS and HTTP (both built in to standard library), then send it along to the relevant service. It’s probably easier to build that than learn nginx or Apache syntax.
There’s certainly more to it if you consider high load systems like in an enterprise, but the average home user doesn’t need all that.
Caddy does everything I need:
I’ve done it the hard way, and I don’t feel like I gained anything. Everything involved is simple:
I’ve done it “the hard way” by scripting up cron and configuring Nginx, but what’s the value of learning that when your web-server can do it automatically for you? Gate keeping?
I agree in general that people should learn how things work. Learn what TLS, HTTP, and whatnot are and do so you can debug stuff. But don’t feel obligated to learn complex software when you just need something simple.
In other words, YAGNI: You Ain’t Gonna Need It. Or KISS: Keep It Stupid Simple. Don’t copy paste “magic” Apache or Nginx incantations from the internet, use something simple and focus on learning fundamentals.