5 Ways to Host a Web Server
Apache
Originally from 1995 this is the OG when it comes to hosting. With RedHat Linux and CPanel, apache is one of the most stable and tried and tested methods for hosting. This is the way I was introduced to self hosting websites. While this is a great way to host something, I found NGINX to be an easier fit for my needs.
NGINX
NGINX has been around since 2004. I first discovered it around 2008 and it has been my go to web hosting solution for decades. Its ability to proxy and speediness in general are what made it work for me.
Caddy
Caddy, like NGINX is great for a reverse proxy. It has a very simple config that can also be updated with a RESTAPI. It also has certificate management built in. Caddy is the newcomer as it was started in 2014 and released in 2019. The fact that it doesn’t have the maturity though isn’t an issue, its build for the modern era which gives it a nice advantage.
HAProxy
Struggles with logging, kernel writer https://www.haproxy.com/blog/introduction-to-haproxy-logging
Since 2000 HAProxy has been a way to load balance for more strenuous sites. Being able to hit multiple back-end proxies and use more resources than a single node can have helps keep uptime high. Its well maintained, stable quick, packed with features and works well.
Node.JS
Finally, Node.JS. This is a great way to host a simple web app. Node is written in Java Script and can run code outside of a browser. This means it can manage data, manipulate the site on the fly, and be very dynamic. This is a feature rich as anyone can make it since this is a coded server written by the programmer themselves.
Conclusion
There are still many more ways to go about this. It really depends on your use case for how you want your site to be shown to the end user. Your development environment is another factor. Microsoft IIS Server with ASP.NET as an example. However, something like this will lock you into an ecosystem that is heavily reliant on the Windows infrastructure. I find this to be limiting and requires more resources to keep something running.