Specifications

Chapter 5 Working with Open Source Applications 63
File Description Apache 2.2 Location
Conguration le for Web service /etc/apache2/ folder
Site conguration les /etc/apache2/sites/ folder
Executable le /usr/sbin/httpd
Web modules /usr/libexec/apache2/ folder
Error log /var/log/apache2/ folder (with a symlink that lets
the folder be viewed as /Library/Logs/WebServer/)
Temporarily disabled virtual hosts /etc/apache2/sites_disabled/ folder
Static content for both Apache versions defaults to /Library/WebServer/Documents/.
CGIs for both Apache versions default to /Library/WebServer/CGI-Executables/.
All les in /etc/apache2/sites/ are read and processed by Apache when it performs
a hard or soft (graceful) restart. Each time you save changes, the server does a
graceful restart.
If you edit a le using a text editor that creates a temporary or backup copy, the server
restart might fail because two les with almost identical names are present. To avoid
this problem, delete temporary or backup les created when editing les in this folder.
Editing Apache Conguration Files
You can edit Apache conguration les if you need to work with features of the
Apache web server that are not part of Server Admin.
To edit conguration les, you must be an experienced Apache administrator and
you must be familiar with text-editing tools. Be sure to make a copy of the original
conguration le before editing it.
The httpd.conf conguration le handles directives controlled by Server Admin. You
can edit this le as long as you follow the text conventions and comments in the le.
This le also has a directive to include the .../sites/ folder. That folder contains virtual
hosts for that server. The les are named with the unique identier of the virtual host
(for example, 0000_17.221.43.127_80_www.example.com.conf). You disable specic sites
by moving them to the sites_disabled folder and then restarting Web service. You can
also edit site les as long as the conventions in the le are followed.
One hidden le in the sites_disabled folder is named default_default.conf.” This le is
used as the template for new virtual hosts created in Server Admin. An administrator
can edit the template le to customize it, taking care to follow the conventions
established in the le.
For more information about Apache and its modules, see Apache Web Module
Overview” on page 75.