We should quickly examine some of the changes have been made to the system by the installation of these packages. Between then, apache2 and apache2-prefork packages have installed a web server (in /usr/sbin/) but they have also installed files in other locations.
Locations added or changed by the installation:
/etc/apache2/: this is where Apache expects to find its configuration files. Many of the files installed here are part of SLES's custom system for managing Apache, which we won't be using. However httpd.conf will be important because it contains Apache's main configuration. We'll be doing lots of work on this file.
/etc/init.d/apache2: is the script run at system startup, and other times, to start and stop the Apache server
/etc/logrotate.d/apache2: a configuration file to manage log file rotation. We'll come back to this later.
/usr/lib/apache2/ and /usr/lib/apache2-prefork/: much of Apache's functionality is implemented as a series of plug-in modules. Much of this course will be devoted to what they can do and how to get them to do it. Each one exists as a library file and they are stored in this directory.
/usr/share/apache2/: various resources that Apache can be configured to use are stored in these directories.
/var/log/apache2/: this (empty) directory is created as a place to store the log files that the web server will write as it works. An apache2 subdirectory is used because there will typically be more than one log file in use at any time. This subdirectory holds them together. We will discuss log files in detail in Chapter 7.
In addition, the directory /srv/www was created by the base SLES install and provides the default location for files served by the web server. In particular, the htdocs subdirectory, which is initially empty, is the basic website. Anything put here will appear on the website. See Section 1.3 for how to get a web site up and running as quickly as possible. Other subdirectories of /srv/www support software that we won't be covering in this course.
Note that the /srv/www directory tree is owned by root. Any changes to the website as the system currently stands need to be done by root
Programs included with the web server
/usr/sbin/ab2: This a stress-tester for the web server. Please do not stress-test people's servers without their permission.
/usr/sbin/htdbm2, /usr/sbin/htdigest2, /usr/sbin/htpasswd2: These manipulate user and password information for web access controls. We will see htpasswd2 and htdigest2 later in Section 10.3 but we will not be considering the other commands in this course.
/usr/sbin/logresolve2: If a log file contains IP addresses rather than DNS names for clients then this program will run through the log file and write out a copy with host names replacing IP addresses. Because it caches resolved addresses it does this rather efficiently. We will be covering log files (and why they might have IP addresses rather than host names) in Chapter 7.
/usr/sbin/apache2ctl: This is the script that is provided by the Apache team to simplify turning on and off the service. However, to keep the startup and shutdown of the server consistent with the rest of the system the standard startup scripts don't use this for the main work.
/usr/sbin/httpd2-prefork: This is the web server itself, normally symlinked to /usr/sbin/httpd2.
/usr/sbin/rotatelogs2: This is an Apache utility providing for rotating log files. However, it is not used by a SLES system because there is a system-wide log rotation facility which is used instead for consistency with the rest of the system. This will be considered in detail in Section 7.3.
/usr/sbin/suexec2: This is a helper program for Apache that lets the server run external programs (e.g. CGI programs) as a different user than the user running the web service itself. As we will not be covering CGI programming in this course we will not be making any use of this program. As it is a setuid root program, you may want to remove it if you don't need it.
/usr/sbin/apxs2: This is a tool for building Apache modules from source. We will use this in Section 10.5 when we build a module to let our server use the University's Raven authentication service.
The '2' on the end of the names of these programs is a feature of SLES's packaging of Apache - it would allow Apache 1 and Apache 2 packages to coexist on the same server. In many other installations the commands will not have the additional '2'. They may also be in different locations, for example some may be in /usr/bin/ rather than /usr/sbin/.