User manual
Chapter 5 Working With WebObjects and Web-Related Open Source Applications 63
Note: All files in /etc/httpd/sites/ are read and processed by Apache when it does a
hard or soft (graceful) restart. Each time you save changes, the server does a graceful
restart. If you edit a file using a text editor that creates a temporary or backup copy,
the server restart may fail because two files with almost identical names are present.
To avoid this problem, delete temporary or backup files created by editing files in this
folder.
Editing Apache Configuration Files
You can edit Apache configuration files if you need to work with features of the Apache
web server that aren’t included in Server Admin. To edit configuration files, you should
be an experienced Apache administrator and familiar with text-editing tools. Be sure to
make a copy of the original configuration file before editing it.
The configuration file httpd.conf handles all directives controlled by the Server Admin
application. You can edit this file, as long as you follow the conventions already in place
there (as well as the comments in that file). This file also has a directive to include the
sites/ directory. In that directory are all of the virtual hosts for that server. The files are
named with the unique identifier of the virtual host (for example,
0000_17.221.43.127_80_www.example.com.conf). You disable specific sites by moving
them to the sites_disabled directory and then restarting web service. You can also edit
site files as long as the conventions in the file are followed.
One hidden file in the sites_disabled folder is named “default_default.conf.” This file is
used as the template for all new virtual hosts created in Server Admin. An administrator
can edit the template file to customize it, taking care to follow the conventions already
established in the file.
For more information about Apache and its modules, see “Apache Modules” on
page 71.
Starting and Stopping Web Service Using the apachectl Script
The default way to start and stop Apache on Mac OS X Server is to use the web module
of Server Admin.
If you want to use the apachectl script to start and stop web service instead of using
Server Admin, be aware of the following behaviors:
• The web performance cache is enabled by default. When web service starts, both the
main web service process (httpd) and a webperfcache process start. (The
webperfcache process serves static content from a memory cache and relays
requests to httpd when necessary.) The apachectl script that comes with Mac OS X
Server is unaware of webperfcache. So if you have not disabled the performance
cache, you also need to use the webperfcachectl script to start and stop
webperfcache.