Introduction to web servers

Web servers are used to serve web pages requested by client computers. Clients typically request and view web pages using web browser applications such as Firefox, Opera, Chromium, or Internet Explorer.

If you’re new to web servers, see this page for more information on the key concepts.

Squid proxy server

Squid is a popular, open-source, proxy caching server that can help optimise network efficiency and improve response times by saving local copies of frequently accessed content. Read more about Squid proxy servers and what they can do, or find out how to install a Squid server.


LAMP installations (Linux + Apache + MySQL + PHP/Perl/Python) are a popular setup for Ubuntu servers. Linux provides the operating system, while the rest of the stack is composed of a web server, a database server, and a scripting language.

One advantage of LAMP is the substantial flexibility it provides for combining different web server, database, and scripting languages. Popular substitutes for MySQL include PostgreSQL and SQLite. Python, Perl, and Ruby are also frequently used instead of PHP. Apache can be replaced by Nginx, Cherokee and Lighttpd.

In this documentation, we can show you how to get started with LAMP quickly, but also how to separately install and configure some of the different tooling options in the classic LAMP stack.

Web server

Apache is the most commonly used web server on Linux systems, and the current version is Apache2. It is robust, reliable, and highly configurable. This set of guides will show you:

Nginx is a popular alternative web server also widely used on Linux, with a focus on static file serving performance, ease of configuration, and use as both a web server and reverse proxy server.

Database server

The database server, when included in the LAMP stack, allows data for web applications to be stored and managed. MySQL is one of the most popular open source Relational Database Management Systems (RDBMS) available, and you can find out in this guide how to install MySQL – or PostgreSQL, as another popular alternative.

Scripting languages

Server-side scripting languages allow for the creation of dynamic web content, processing of web forms, and interacting with databases (amongst other crucial tasks). PHP is most often used, and we can show you how to install PHP, or if you prefer, we can show you how to install Ruby on Rails.

Whichever scripting language you choose, you will need to have installed and configured your web and database servers beforehand.

LAMP applications

Once your LAMP stack is up-and-running, you’ll need some applications to use with it. Some popular LAMP applications include wikis, management software such as phpMyAdmin, and Content Management Systems (CMSs) like WordPress. These guides will show you how to install and configure phpMyAdmin and WordPress as part of your LAMP stack.

1 Like

One small comment to the section Sharing Write Permission: I guess that the creation of a group called webmasters is not necessary at all, since there already exists the group www-data created by the apache installation.
So better just change the example to use www-data instead and show how to add the necessary accounts:

usermod -a -G www-data

I’ve updated the text to reflect this, but the www-data group should not be granted write permissions. It is intended to sandbox the Apache process while it’s running, and granting it permissions to write to the document root means that attackers exploiting a vulnerability in Apache (or one of the applications it is serving) would be able to modify and/or remove the content in the document root.

While this guide is fine for html, There is no discussion on how to use the cgi-bin directory. For reasons I cannot understand Apache keeps changing the setup and rules to activate the cgi-bin directory so you can run programs a html page and the internet seems devoid of explaining how to do this.