Cut and Paste Ubuntu Installation: Web Servers
If you are surfing the Internet, you are interacting with a web server. If you are like the average web user, you are probably unaware that there are different types of web servers. If you are an IT geek like myself, you are probably aware of maybe eight or ten. So, you will probably be surprised, as I was, to discover that you could install as many as twenty different web servers directly from the Ubuntu repositories!
Here is the full list in alphabetical order:
- Apache HTTP Server
- Boa Webserver
- cakephp-instaweb
- Cherokee
- DHTTPD
- DidiWiki
- Elserv
- Jetty
- lighttpd
- Mathopd
- micro_httpd
- mini_httpd
- Monkey HTTP Daemon
- Mono
- Nanoweb
- Nginx
- Roxen WebServer
- thttpd
- webfs
- Yaws
Below, you will find a brief description of each web server quoted from their website and the command to install each on in Ubuntu. The installation commands are cut and paste and should work without any difficulty. If they do not work, please try the following:
- update your packages from the repositories with this command:
sudo apt-get -y update - upgrade your version of Ubuntu to the latest packages with this command:
sudo apt-get -y upgrade - make sure that you have the root password because you will not get very far without it
Anyway, here we go with the web server installations:
Apache HTTP Server
The Apache HTTP Server Project is an effort to develop and maintain an open-source HTTP server for modern operating systems including UNIX and Windows NT. The goal of this project is to provide a secure,efficient and extensible server that provides HTTP services in sync with the current HTTP standards.
Apache has been the most popular web server on the Internet since April 1996.
Installation
sudo apt-get -y install apache2
Boa Webserver
Boa is a single-tasking HTTP server. That means that unlike traditional web servers, it does not fork for each incoming connection, nor does it fork many copies of itself to handle multiple connections. It internally multiplexes all of the ongoing HTTP connections, and forks only for CGI programs (which must be separate processes), automatic directory generation, and automatic file gunzipping. Preliminary tests show Boa is capable of handling several thousand hits per second on a 300 MHz Pentium and dozens of hits per second on a lowly 20 MHz 386/SX.
The primary design goals of Boa are speed and security. Security, in the sense of “can’t be subverted by a malicious user,” not “fine grained access control and encrypted communications”. Boa is not intended as a feature-packed server. Modifications to Boa that improve its speed, security, robustness, and portability, are eagerly sought. Other features may be added if they can be achieved without hurting the primary goals.
Installation
sudo apt-get -y install boa
cakephp-instaweb
cakephp-instaweb is tiny Python-based webserver suitable for quick development of CakePHP applications, similar to Django’s ‘runserver’ and the “script/server” script in Ruby on Rails.
It requires zero configuration for running CakePHP applications, allowing you to:
- delay webserver configuration to deployment time
- develop multiple applications simultaneously with ease
- just get on building your application
Installation
sudo apt-get -y install cakephp-instaweb
Cherokee
A user friendly interface called cherokee-admin is provided for a no-hassle configuration of the server. Check out the benchmarks and documentation to learn more, and give it a try to squeeze your hardware to the fullest!
Installation
sudo apt-get -y install cherokee
DHTTPD
DHTTPD is a little program I knocked up after a friend dared me to do it, so here we are!
It’s a little webserver made in my spare time. It’s main features are listed below. DHTTPD stand for Dublet’s HyperTextTranferProtocol Deamon, but that’s a bit long for a program name, so I abbreviated it.
- Free (as in free)
- BSD licensed
- Native IPv6
- Virtual hosts support
- Nearly working HTTPS on both IPv4 and v6
- QOS (Quality Of Service) layer (Bandwidth managing)
- Support for CGI scripts
- Built-in Perl interpreter for massive speed gains
- Usage of script threads for simultanious execution
- Fast (poll(), uses zero-copy tcp when possible)
- Small (Tiny memory footprint, little disk usage)
- Secure (it tries to be anyway)
- Sheds any root privileges it might have
- Optionally doesn’t serve out files which are:
- Not readable to either the owner, group or other
- Writable to others
- Writable to the daemon (if it owns the file or shares group with file owner)
- Uses length safe functions
- Apache compatible access log
- has man pages
- simple configuration
- Efficient (well…)
- Developed by cool people
- Makes your whites whiter than white
- Of every dollar you spend on purchasing dhttpd, 25 cents goes to charity
- Triple your money back guarantee
Installation
sudo apt-get -y install dhttpd
DidiWiki
DidiWiki is a small and simple WikiWikiWeb implementation. It’s intended for personal use for notes, Todo’s, etc. It includes its own Web server and weighs in at approximately 25k stripped, making it practical for embedded use (e.g. handhelds).
Installation
sudo apt-get -y install didiwiki
Elserv
Elserv is an HTTP server which runs on Emacs.
Since Emacs does not support server sockets, Elserv runs dedicated server process (ruby script) as a backend process and communicate with it to provide a server feature on Emacs.
- Easy to start a web server (Just execute an emacs command).
- Dynamic content can be developed using emacs lisp.
- Contents can be replaced by simply `eval’uating the lisp code.
- HTTP 1.1 GET, HEAD, POST is supported.
Installation
sudo apt-get -y install elserv
Jetty
Jetty is an open-source, standards-based, full-featured web server implemented entirely in Java. It is released under the Apache 2.0 licence and is therefore free for commercial use and distribution. First created in 1995, Jetty has benefitted from input from a vast user community and consistent and focused development by a stable core of lead developers. There are many more examples of Jetty in action on the Jetty Powered Page that has selections from among the tens of thousands of production Jetty instances. However, as
Jetty aims to be as unobtrusive as possible, countless websites and products are based around Jetty, but Jetty is invisible!Jetty can be used as:
- a stand-alone traditional web server for static and dynamic content
- a dynamic content server behind a dedicated HTTP server such as Apache using mod_proxy
- an embedded component within a java application
This flexibility means that Jetty can be encountered in a number of different contexts:
- shipped with products to provide out-of-the-box useability eg Tapestry, Liferay
- distributed on CDs with books to make examples and exercises ready-to-run
- incorporated into applications as a HTTP transport eg JXTA, MX4J
- integrated as a web container in JavaEE app servers eg JOnAS, Geronimo, JBoss, JFox
- included as a component of an application eg Continuum, FishEye, Maven
Installation
sudo apt-get -y install jetty
lighttpd
Security, speed, compliance, and flexibility — all of these describe lighttpd (pron. lighty) which is rapidly redefining efficiency of a webserver; as it is designed and optimized for high performance environments. With a small memory footprint compared to other web-servers, effective management of the cpu-load, and advanced feature set (FastCGI, SCGI, Auth, Output-Compression, URL-Rewriting and many more) lighttpd is the perfect solution for every server that is suffering load problems. And best of all it’s Open Source licensed under the revised BSD license.
Web 2.0
lighttpd powers several popular Web 2.0 sites like YouTube, wikipedia and meebo. Its high speed io-infrastructure allows them to scale several times better with the same hardware than with alternative web-servers.
This fast web server and its development team create a web-server with the needs of the future web in mind:
Its event-driven architecture is optimized for a large number of parallel connections (keep-alive) which is important for high performance AJAX applications.
Installation
sudo apt-get -y install lighttpd
Mathopd
Mathopd is a very small, yet very fast HTTP server for UN*X systems.
Mathopd supports useful features of HTTP/1.1, such as persistent connections, partial responses and pipelining. It does not support things like content negotiation. The latest version of the software (1.5) also supports CGI/1.1.
Mathopd was designed specifically to run as a single process, and to never grow in size. When this software was first written (early 1996) this is something that other HTTP servers were not very good at.
Installation
sudo apt-get -y install mathopd
micro_httpd
micro_httpd is a very small Unix-based HTTP server. It runs from inetd, which means its performance is poor. But for low-traffic sites, it’s quite adequate. It implements all the basic features of an HTTP server, including:
- Security against “..” filename snooping.
- The common MIME types.
- Trailing-slash redirection.
- index.html
- Directory listings.
All in about 200 lines of code.
micro_httpd can also be used to serve HTTPS by wrapping it with stunnel. Instructions are included.
Installation
sudo apt-get -y install micro-httpd
mini_httpd
mini_httpd is a small HTTP server. Its performance is not great, but for low or medium traffic sites it’s quite adequate. It implements all the basic features of an HTTP server, including:
- GET, HEAD, and POST methods.
- CGI.
- Basic authentication.
- Security against “..” filename snooping.
- The common MIME types.
- Trailing-slash redirection.
- index.html, index.htm, index.cgi
- Directory listings.
- Multihoming / virtual hosting.
- Standard logging.
- Custom error pages.
It can also be configured to do SSL/HTTPS and IPv6.
mini_httpd was written for a couple reasons. One, as an experiment to see just how slow an old-fashioned forking web server would be with today’s operating systems. The answer is, surprisingly, not that slow - on FreeBSD 3.2, mini_httpd benchmarks at about 90% the speed of Apache. The other main reason for writing mini_httpd was to get a simple platform for experimenting with new web server technology, for instance SSL.
Installation
sudo apt-get -y install mini-httpd
Monkey HTTP Daemon
Monkey is a Web server written in C that works under Linux. This is an open source project based on the HTTP/1.1 protocol. The objective is to develop a fast, efficient, small and easy to configure web server
Installation
sudo apt-get -y install monkey
Mono
The Mono Project aims to make developers productive and happy: Mono 2.2 is our gift to the world. Sponsored by Novell (http://www.novell.com), the Mono open source project has an active and enthusiastic contributing community and is positioned to become the leading choice for development of Linux applications.
Mono Feature Highlights
- Multi-Platform
Runs on Linux, OS X, BSD, and Microsoft Windows, including x86, x86-64, ARM, s390, PowerPC and much more
- Multi-Language
Develop in C# 3.0 (including LINQ), VB 8, Java, Python, Ruby (http://www.ironruby.net/), Eiffel (http://www.eiffel.com/), F# (http://research.microsoft.com/fsharp/), Oxygene (http://remobjects.com/oxygene), and more
- Binary Compatible
Built on an implementation of the ECMA’s Common Language Infrastructure and C#
- Microsoft Compatible API
Run ASP.NET, ADO.NET, and Windows.Forms 2.0 applications without recompilation
- Open Source, Free Software
Mono’s runtime, compilers, and libraries are distributed under OSI approved licenses and are available for dual-licensing
- Comprehensive Technology Coverage
Bindings and managed implementations of many popular libraries and protocols
Installation
sudo apt-get -y install mono-xsp2
Nanoweb
Nanoweb is an HTTP server written in PHP, designed to be small, secure, and extensible.
Nanoweb’s main features are :
- HTTP/1.1 compliance
- Powerful and easy configuration
- Modular architecture
- FastCGI, CGI and Server side includes support
- Name and port based virtual hosts
- Access control lists
- htpasswd, MySQL, PostgreSQL and LDAP authentication support
- Themes for server generated content
- Apache compatible log format, MySQL logging
- Directory browsing
- inetd support and SSL via external helpers
- Denial of Service protection
- Proxy Server extension
- Filters and gzip support
- RBL support (mail-abuse.org)
- Extension Protocols (request methods) support
Installation
sudo apt-get -y install nanoweb
Nginx
Nginx (pronounced “engine x”) is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server. Written by Igor Sysoev in 2005, Nginx now hosts between 1% and 4% of all domains worldwide (sources: 1, 2). Although still in beta, Nginx is known for its stability, rich feature set, simple configuration, and low resource consumption.
Installation
sudo apt-get -y install nginx
Roxen WebServer
Roxen WebServer is a full-featured open-source web server distributed under the GPL license. It runs on a number of different operating systems including Windows, Linux, Solaris and Mac OS X.
Some of the strong points of this server is:
- Open source code.
- A web-based interface for easy configuration and administration.
- The highly regarded Roxen graphics support which can be used for dynamic generation of e.g. headers, images and charts.
- Integrated MySQL database.
- Server-side programming via RXML, Java, Perl, PHP, CGI scripts and more.
- Strong encryption.
- Modular architecture where server extensions can be loaded without shutting down the server process.
- Platform-independent architecture makes custom modules portable with no extra effort.
Installation
sudo apt-get -y install roxen4
thttpd
thttpd is a simple, small, portable, fast, and secure HTTP server.
- Simple:
- It handles only the minimum necessary to implement HTTP/1.1. Well, maybe a little more than the minimum.
- Small:
- See the comparison chart. It also has a very small run-time size, since it does not fork and is very careful about memory allocation.
- Portable:
- It compiles cleanly on most any Unix-like OS, specifically including FreeBSD, SunOS 4, Solaris 2, BSD/OS, Linux, OSF.
- Fast:
- In typical use it’s about as fast as the best full-featured servers (Apache, NCSA, Netscape). Under extreme load it’s much faster.
- Secure:
- It goes to great lengths to protect the web server machine against attacks and breakins from other sites.
It also has one extremely useful feature (URL-traffic-based throttling) that no other server currently has. Plus, it supports IPv6 out of the box, no patching required.
Installation
sudo apt-get -y install thttpd
webfs
This is a simple http server for mostly static content. You can use it to serve the content of a ftp server via http for example. It is also nice to export some files the quick way by starting a http server in a few seconds, without editing some config file first.
It uses sendfile() and knows how to use sendfile on linux and FreeBSD. Adding other systems should’nt be difficuilt. There is some sendfile emulation code which uses read()+write() and a userland bounce buffer, this allows to compile and use webfs on systems without sendfile() too.
Recent versions also got limited CGI support (GET requests only) and optional SSL support.
Installation
sudo apt-get -y install webfs
Yaws
Yaws is a HTTP high perfomance 1.1 webserver particularly well suited for dynamic-content web applications. Two separate modes of operations are supported.
- Standalone mode where Yaws runs as a regular webserver daemon. This is the default mode.
- Embedded mode where Yaws runs as an embedded webserver in another erlang application.
Yaws is entirely written in Erlang furthermore it is a multithreaded webserver where one Erlang light weight process is used to handle each client.
The main advantages of yaws compared to other Web technologies are performance and elegance. The performance comes from the underlying Erlang system and its ability to handle concurrent processes in an efficient way. Its elegance comes from Erlang as well. Web applications don’t have to be written in ugly adhoc languages.
Installation
sudo apt-get -y install yaws
Conclusion
As I was working through the installation procedures for the different servers, I was struck by how varied the installations were in size, features, and dependencies. Make sure that you take your time and research which web server is right for your specific application.
Related articles:
If you found this post useful, why don't you buy me a cup of coffee to show your gratitude?
2 Responses to “Cut and Paste Ubuntu Installation: Web Servers”
-
K-IntheHouse Says:
March 3rd, 2009 at 10:07 amTim,
Really great list of web servers. Some of these I didn’t even know about. I really enjoyed your posts on Nginx and I am about to try my hand at running WordPress on it.
Stumbled!
-
Anders Says:
December 28th, 2009 at 1:35 pmAt this great blog you can read up on how to run PHP, Wordpress and Trac on Yaws.
http://thestaticvoid.com/post/2009/08/04/replacing-apache-with-yaws/I should be quite easy to run other services on Yaws working from that blog.

![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=833f74fb-2ff5-4258-b0cd-b1ea00801727)
