
Putting Apache to Work
|
33
Putting Apache to Work
As mentioned earlier in this chapter, we’re including a web server in our initial setup
because it’s important for you to learn some basic server administration, and because
the server can be a useful host for other tools. At the end of this chapter we’ll use it
to serve up web statistics generated by Webalizer.
In November 2006, Netcraft published a report stating that 60 percent of the web
sites on the Internet use Apache. That makes it more widely used than all other web
servers combined.
Apache is well integrated with most Linux distributions. In this section we will fol-
low a familiar pattern and install and configure Apache by running the following
command:
# apt-get install apache2 apache2-doc
Setting up ssl-cert (1.0-11) ...
Setting up apache2-utils (2.0.54-5) ...
Setting up apache2-common (2.0.54-5) ...
Setting Apache2 to Listen on port 80. If this is not desired, please edit
/etc/apache2/ports.conf as desired. Note that the Port directive no longer
works.
Module userdir installed; run /etc/init.d/apache2 force-reload to enable.
Setting up apache2-mpm-worker (2.0.54-5) ...
Starting web server: Apache2.
Setting up apache2 (2.0.54-5) ...
Setting up apache2-doc (2.0.54-5) ...
Once Debian finishes installing the apache httpd server, run:
# apt-get install libapache2-mod-php4 libapache2-mod-perl2 \
php4 php4-cli php4-common php4-curl php4-dev php4-domxml ...