Solved Choice of web server and database for hosting services on FreeBSD

Hello everyone,

I have a few services running in my Homelab that require a web server and sometimes a database.
Currently everything uses a mix of MySQL, MariaDB and PostgreSQL for the database and Apache or Nginx for the web server.
The reason for this wild mix is that when I was new to running my own services at home, I mostly followed step-by-step instructions instead of doing things myself.
Now that I've learned a lot in the last 4-5 years, I want to build the things I use myself so I know how to fix things when they break and to be more flexible.

At the moment, I have no real preferences for the web server or database I use, but saw that a lot of people recommending Nginx + PostgreSQL, while businesses seem to like using Apache + MySQL.

But what combination of web server and database do you think would be good to learn a good all-rounder in 2023 on FreeBSD?
What should I look for when using the services I mentioned (security, performance, compatibility, support from other projects that build on them, etc.)?

Cheers :)
 
But what combination of web server and database do you think would be good to learn a good all-rounder in 2023 on FreeBSD?
All combinations. Once you understand one it's actually quite easy to understand the other. MySQL and MariaDB are mostly the same, they only deviate on specific details. MySQL/MariaDB and PostgreSQL aren't that different either. You typically don't run into those differences with a basic dynamic website with database backend (the actual SQL is pretty similar). Knowing how to configure nginx and Apache means you can run almost anything.
 
From my experience over many years the Mysql port sometimes runs into trouble when updating. I don't have comparable Postgresql experience, but it is what I would choose if I started over now.

Nginx has somewhat weird configuration, I like Apache's better.
 
That would really be the best, but unfortunately I don't have unlimited time and have to start somewhere.
Start with the most common one; FAMP, FreeBSD, Apache, MySQL, PHP. I'd pick MySQL in that case instead of MariaDB because MySQL is the default on the official packages. Then you won't have to struggle with dependencies. You don't need to add that hassle to an already complex setup. You can focus on that once you've learned a basic FAMP setup.
 
Start with the most common one; FAMP, FreeBSD, Apache, MySQL, PHP. I'd pick MySQL in that case instead of MariaDB because MySQL is the default on the official packages. Then you won't have to struggle with dependencies. You don't need to add that hassle to an already complex setup. You can focus on that once you've learned a basic FAMP setup.
I'll do that then, thanks for the replies :)
 
Back
Top