Ubuntu: Apache Install

by Mike on July 12, 2010 · 1 comment

in Web Server

Server features that stand out for Apache are it’s speed, configuration options , stability and feature set.  Apache is known for rock solid stability that comes from a source code that has been available for a long time and many have reviewed it.  Also the wide usage has helped to facilitate bug fixes quickly.  Ubuntu training provides an in depth  analysis of the Apache web server as it applies to real work use of Apache.

apache2 -v
Server version: Apache/2.2.14 (Ubuntu)
Server built:   March 10 2010 13:04:44

Features in Apache on Ubuntu
Unix Threading – Apache is now capable of running in a hybrid multiprocess, multithreaded mode which will provide scalability to those who have the available resources.
New Build System – The build system is now based on autoconf and libtool making it similar to other packages.
Multiprotocol Support – Apache now can support multiple protocols.
Better non-Unix Support – Now Apache is better at supporting other platforms like, Windows, BeOS and OS/2.
New Apache API – The API modules now have new ordering and priority settings.
IPv6 Support – Apache is now ready to support IPv6 when the new network addressing system take hold.
Filtering – Apache modules may be written as filters which control stream of content between client and server.
Multi-language Error Responses
Simplified Configuration – The Port and BindAddress directives have been eliminated.
Native Windows NT Unicode Support – Apache now uses utf-8 for all filename encodings.
Regular Expression Library Upgraded – Apache now includes the Perl Compatible Regular Expression Library and all regular expressions use the Perl 5 syntax.

To install Apache:

sudo apt-get install apache2

Modular Installation of Apache
When you install apache you will see a number of files and directories designed to make apache more modular.  One of the changes that you will notice is that the apache2.conf file only contains the Global Settings for apache, 235 lines.
Move into the apache2 directory to view the files available.

cd /etc/apache2
apache2.conf  envvars     mods-available  ports.conf       sites-enabled  conf.d        httpd.conf  mods-enabled

The  “Global Configuration” for the web server is included in this file.   This file impacts all aspects of apache as it has implications for the all web server running including the default web server and any virtual servers.

The mods-available directory contains modules that could be loaded wit apache as they are installed on the system.  Certainly you do not want to load modules you are not going to use as they consume resources.

The modules that have been loaded with apache are listed in mods-enabled.

This file contains the ports available for apache to listen on as you can see in a listing of the file.  If you want your server to listen on different ports you must change this file.

NameVirtualHost *:80
Listen 80

<IfModule mod_ssl.c>
# SSL name based virtual hosts are not yet supported, therefore no
# NameVirtualHost statement here
Listen 443

This directory contains sites that you could enable on your system.  Actually there are two templates; default and default-ssl which allow you to use them as templates for setting up a site whether it used port 80 or port 443.

This is a directory which contains the sites that you have enabled, the domains are set up and the web servers are running.

{ 1 comment }

Lee Murray September 23, 2010 at 8:27 am

thanks for the useful info. The whole ubuntu autoinstaller had me confused. I was considering installing apache manually. Which is better?

Previous post:

Next post: