Web servers are used to store and deliver content for websites. When a web browser like Chrome or Firefox connects to a web server, the web server returns content like HTML, text, images, videos, js files and etc.
The web server and the web browser communicate over HTTP or HTTPS.
The first web server software was created in 1990 and it was called CERN httpd. Since then there have been numerous other solutions.
Here is my list of the top 7 open source web servers in 2020!
Nginx is an open source project created bu Igor Sysoev. It was initially released in 2004 and it has proven itself as highly reliable solution, but most of all Nginx is popular for its high performance and scalability.
Besides as a web server, Nginx can also be used for load balancing, media streaming, reverse proxy and more.
You can install Nginx via your OS package manager:
apt install nginx
yum install nginx # or dnf install nginx
Once installed Nginx would start listening on port 80 and the default index page would look like this:
Nginx was acquired by F5 and now they also offer paid solution called Nginx Plus, however the open source project remains as well.
For more information about Nginx I would recommend this reading this article here:
2. Apache HTTP Server
The Apache HTTP Server has been the go to web server for a long time. It was released in 1995 and is commonly referred to as Apache or just httpd.
You can run Apache on almost all major operating systems out there like Linux, Mac, Windows and more.
Apache is highly customizable, reliable and free.
To install Apache all you need to do is:
apt install apache2
yum install httpd # or dnf install httpd
The default Apache index page looks like this:
The Lighttpd opensource web server was designed with speed in mind and is used for speed-critical websites. One of the major benefits of Litehttpd is that it is quite small and does not consume a lot of server resources like CPU.
that is specifically designed for speed-critical applications. Unlike Apache and Nginx, it has a very small footprint (less than 1 MB) and is very economical with the server’s resources such as CPU utilization.
To install Lighttpd, you can use the following commands:
apt install lighttpd
yum install epel-release yum update yum install lighttpd
The default landing page of Lighttpd looks like this:
4. Apache Tomcat
Apache Tomcat is the go to web server for any Java projects.
Unlike the other web servers like Apache HTTP Server and Nginx which are mainly used for serving HTTP, Apache Tomcat is a Servlet and JSP Server serving Java technologies.
For installing and configuring Apache Tomcat I would recommend this tutorial here:
5. Caddy Web Server
The Caddy web server, is an open source web server written in Go.
It uses the Go standard library for its HTTP functionality. One of Caddy's most notable features is enabling HTTPS by default and the support for HTTP/2.
You can go through the following tutorial on How To Host a Website with Caddy on Ubuntu 18.04.
OpenLiteSpeed is an optimized open-source web server that you can use to manage and serve websites. It is designed to handled high traffic loads much better than traditional web servers.
OpenLiteSpeed is the Open Source edition of LiteSpeed Web Server Enterprise and both are maintained by the same team.
You can go through the following tutorial on How To Install the OpenLiteSpeed Web Server on Ubuntu 18.04.
Checkout this tutorial here to learn how to install Install Node.js on Ubuntu 18.04.
Hope that this helps!