Performance tuning for web servers

Slashdot it! Delicious Share on Facebook Tweet! Digg!

Separating Static and Dynamic Content

When individual Apache processes need a lot of RAM, such as for a complex PHP application, then it may be a good idea to have separate processes deliver the static content. It is easier when a separate Apache server with a lean configuration and minimal memory footprint takes over this task. This can then be made into a front end server that directs the PHP requests on to an additional Apache web server via mod_proxy .

Alternatively, it is possible to use your own sub-domains for static content (e.g., ) or its own domain, as with for YouTube.


The mod_status module lets you request information about the activity and performance of the Apache server. The module is inactive by default. It can easily be activated under Debian or Ubuntu via

a2enmod status

The standard URL for accessing the server is /server-status . Typically, you will have to explicitly set the access rights.

<Location /server-status>
        SetHandler server-status
        Require ip

After restarting the web server, access to the status page should be available. Hopefully, this access is limited to the LAN. (See the "Access Is Too Easy" box.)

Access Is Too Easy

The server status page of the official Apache web server (Figure 4) is publicly accessible. If a private server can be accessed via the Internet, it is not a good idea to publish the page.

Figure 4: The statistics are there to help with administration, but they should not be made available on the Internet.

The status page is used for manual analysis, for example, when special load peaks need to be measured. At the same time, this page provides a basis for automatic monitoring that is carried out via something like a Nagios or Icinga plugin [7][8] or via the Percona Apache monitoring template for Cacti [9] (Figure 5). In this way, a web server administrator can systematically monitor the Apache web server and analyze the data.

Figure 5: Various monitoring solutions can be connected to the Apache server. Percona is one of these solutions.

Obviously, the use of mod_status creates a certain amount of overhead. In spite of the overhead, this is a fair trade off.

Buy this article as PDF

Express-Checkout as PDF

Pages: 6

Price $0.99
(incl. VAT)

Buy Ubuntu User

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Perfect setup and installation of ownCloud 9

    ownCloud makes it possible to operate a private cloud on an intranet of almost any size. All you need is a standard LAMP environment, which comes with almost every Linux server.

  • Pydio is a free cloud solution

    Most cloud solutions for small networks are based on ownCloud or, less frequently, Seafile. Pydio is the third open source product trying to gain a foothold as a cloud solution.

  • Installing and testing Nextcloud

    Leading ownCloud developers, including the project founder Frank Karlitschek, became dissatisfied with the direction of the project, so they started Nextcloud, a fork of the code and a new company. The goal is to create a better balance among the company, clients, and users. We take a look at how Nextcloud is faring.

  • Puppet Labs Announces Puppet Enterprise


    Puppet Labs, provider of open source systems management solutions, announced the release of Puppet Enterprise, the first commercially supported version of Puppet.

  • Optimizing, securing, and tuning your network

    In an age of perpetually interconnected devices, keeping your network and its services safe and running smoothly is a high priority whether you're an admin or an end-user.