Server admin and my ADHD brain: I wanted both Apache and Nginx running together on the same server. So I put Haproxy, a load balancer, in front of them, which passed on the request to either depending on the domain name.
It was running fine, but then I started wondering why I was using Nginx anyway, just for reverse proxying. So, I decided to swap Nginx for Caddy. Something I had heard of, but I hadn't known how easy and efficient it was for that exact use.
Once I had Caddy running, I then started to wonder why I was bothering to have Haproxy in front, when I could just have Caddy in front as a reverse proxy, and pass php sites to Apache.
Since Caddy has auto https, I figured I could just let Apache serve the http files to Caddy, and let Caddy handle the SSL/TLS termination.
So I did that, and had to edit each virtualhost file - also removing all of the https stuff, then the mod rewrite stuff also, so that it didn't get stuck in a loop.
It did work, but there were some issue. I could have put my mind to working those out, but instead I wondered if I even really needed Apache. So I tried setting up serving static files with Caddy using php-fpm - but really unsure if it would be able to handle the complexities without directives. But it worked just fine without any messing around. So I removed Apache as well, somehow ending up with just Caddy.
Well that was a journey....
#webdev #adhd #server #webserver #serveradmin #caddy #apache #nginx