The Best Linux Web Server Software (& Apache Alternatives)
<firstimage=”//static.makeuseof.com/wp-content/uploads/2010/12/webservers-title.png”>Since the protocol that runs the world wide web – the HTTP protocol – is open and viewable to the entire world, anyone with the programming knowledge is able to write their own web server. In fact Wikipedia lists over 60 web servers and those are only the ones released to the public. So which is the best one that you should run on your Linux server?
To be able to determine the ‘best’ one we need to look at several factors. Ultimately it depends on what your end goal is since some web servers are geared towards a kind of client, others for speed and others for security. The main factors we are going to look at are reliability, speed, security and ease of use.
A lot of web servers will make claims to being the “king” of one or more of these factors. However I believe the proof is in the pudding and if you look at actual web server usage across the internet you get a better idea of the wisdom of the crowds. Netcraft has been keeping track of web server types, hostnames and other data since 1995 and is a great way to see what the current trends are in web server usage.
Here is their web server usage survey up until December 2010:
Of the top web servers in current use, Microsoft’s web server IIS is the only pure-Windows one. Apache by and large is the most widely used web server software based on the number of users. It is also good to note that it is cross-platform and will run on both Windows and Linux systems.
Rounding out the top of the list we have Other (all other web server software), Google (who uses their own private custom server software), nginx and lighttpd. The three I will detail as the best Linux web server software are lighttpd, nginx and Apache.
Lighttpd (pronounced “Lighty”) was born out of a desire to create a fast, secure and reliable web server with a small memory footprint. From a functional standpoint it works much the same as Apache, the most widely used web server, but with less memory used on busy servers and also greater throughput when pushed to its limit. It currently powers several extremely high traffic websites such as Wikipedia and YouTube.
Configuration is done very similar to Apache (which most people are used to) however the syntax is very different. Their documentation is very thorough and will guide you though any setup tasks you need. There are also many how-tos available online which can help you through the setup of the server depending on your OS or you can check Google for specific details.
Lighttpd is a good web server for those looking to set up a machine with not a lot of memory available or who hope to scale their traffic easier using higher powered software.
Nginx is bit of a different beast. While it does work as normal it is mainly utilized across higher trafficked websites as a web proxy; in other words when a user visits the nginx server with their browser it will send the request to other servers on its own private network depending on the type of content requested.
The documentation available is not clear for beginners, but once you get to know the ins and outs of nginx you will see how powerful it is especially when running larger sites. The best how-tos are available over at Howtoforge and you may need to do some Googling to find specific instructions for your situation.
The Apache HTTP Server is by and large the most popular web server on the Internet running on almost 60% of all web servers and also the one we now compare all others to. Apache’s security, stability and flexibility is why most web server administrators choose it and Apache has proven itself over the long run.
Configuration is well documented and innumerable how-tos and walk-throughs are available for someone just getting started with it. If you are new to web servers Apache is definitely the place to begin.
Apache is available in the default packages on many Linux systems and is actually installed by default on most and ‘httpd’ is synonymous with the Apache web server. As with the other software above the Apache HTTP software is open source and anyone can contribute to it or modify it to their needs.
Which One Is Right For You?
The answer to this question totally depends on your usage. If you are just getting started I would recommend beginning with Apache. If you are looking for a challenge or want to get to know alternatives to Apache, check out lighttpd which uses a low memory footprint. Finally if you need a web proxy for a bank of servers – check out nginx which works very well in this situation.
Do you have any other favorite Linux web servers? Be sure to tell us below!
Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.