You should be wary of installing experimental packages, and never install them on production servers (that is, servers used in "real life"). Very carefully test the packages beforehand on a host that is not connected to a network!

The easiest way to use APT is through Synaptic, which is under the System > Administration menu. Search for apache2 and select it, and Synaptic will add the required dependencies.

Alternatively you can install Apache through a .deb package with the command-line dpkg tool by typing the following:

dpkg -i latest apache.deb where latest_apache.deb is the name of the latest Apache package. For more information on installing packages with APT and dpkg, refer to Chapter 7, "Managing Software."

The Apache package installs files in the following directories:

• /etc/apache2 This directory contains the Apache configuration file, httpd.conf.

• /etc/init.d/ The tree under this directory contains the system startup scripts. The Apache package installs a startup script named apache2 for the web server under the /etc/init.d directory. This script, which you can use to start and stop the server from the command line, also automatically starts and stops the server when the computer is halted, started, or rebooted.

• /var/www The package installs the default server icons, Common Gateway Interface (CGI) programs, and HTML files in this location. If you want to keep web content elsewhere, you can do so by making the appropriate changes in the server configuration files.

• /var/www/manual/ If you've installed the apache-manual package, you'll find a copy of the Apache documentation in HTML format here. You can access it with a web browser by going to http://localhost/manual/.

• /usr/share/man Ubuntu's Apache package also contains manual pages, which are placed underneath this directory. For example, the apache2 man page is in section 8 of the man directory.

• /usr/sbin The executable programs are placed in this directory. This includes the server executable itself, as well as various utilities.

• /usr/bin Some of the utilities from the Apache package are placed herefor example, the htpasswd program, which is used for generating authentication password files.

• /var/log/httpd The server log files are placed in this directory. By default, there are two important log files (among several others): access_log and error_log. However, you can define any number of custom logs containing a variety of information. See the section "Logging," later in this chapter, for more detail.

When Apache is being run, it also creates the file, containing the process ID of Apache's parent process in the /var/run/ directory.

Was this article helpful?

0 0

Post a comment