
Chapter 1. Installing the software
cgi−bin
error
html
icons
*.html.var
include
bottom.html
spacer.html
top.html
usage
msfree.png
webalizer.png
*.png
/var/www
Figure 1-9. Initial document hierarchy
The /var/www directory is the default location for files served by the web server. One
of its subdirectories, cgi-bin is empty as Apache does not ship with CGI scripts any
more. This course does not cover CGI programming. There is a different University
Computing Service course, CGI Scripting for Programmers: Introduction, for this.
The html subdirectory is similarly almost empty. Its only content is a directory usage
which has nothing to do with how to run the web server but is, rather, where the
webalizer log analysis application puts its reports on how much the server has been
used. We will cover this in depth in the Section called Log file analysis in Chapter 7. The
html directory is the basic website. Anything put here will appear on the website. See
the Section called Quick and Dirty Web Server for how to get a web site up and running
as quickly as possible.
The icons subdirectory contains the icons used in the automatically generated list-
ings. We will use these extensively when we discuss automatic indexing of directories
in the Section called Automatic indexing of directories in Chapter 6.
The most complex installed directory structure is in error. This contains a large num-
ber of files whose names are HTTP error names with .html.var as a suffix. Each of
these contains the web page that will be displayed if the corresponding error condi-
tion happens. We will not be discussing error documents in this course. Each error
page has the error in four different languages and the web server is geared up to
serve the appropriate language from the choice. (This is what the .var suffix is all
about.)
Note that the /var/www directory tree is owned by root. Any changes to the website
as the system currently stands need to be done by root
Two other changes have been made to the system. A user and group have been cre-
ated for the web server to run as.
$ grep apache /etc/passwd /etc/group
/etc/passwd:apache:x:48:48:Apache:/var/www:/sbin/nologin
/etc/group:apache:x:48:
Figure 1-10. The apache user and group
User programs included with the web server
6
Kommentare zu diesen Handbüchern