Server Admin 10.4 Help

Apache

Apache is the http web server provided with Mac OS X Server. You can use the Server Admin application to manage most server operations, but in some instances you may want to add or change parts of the open source Apache server. In such situations, you need to modify Apache configuration files and change or add modules.

Note: Mac OS X Server contains two versions of the Apache web server—Apache 1.3 and Apache 2.0. Version 1.3 is supported in the Server Admin application; version 2.0 is for evaluation.

Location of Essential Apache Files

Locations of key Apache files are as follows:

  • The Apache configuration file for web service is located in the directory /etc/httpd/.
  • The site configuration files are located in the directory /etc/httpd/sites.
  • The Apache error log, which is very useful for diagnosing problems with the configuration file, is located in the directory /var/log/httpd/ (with a symlink that allows the directory to be viewed as /Library/Logs/WebServer/).
  • Temporarily disabled virtual hosts are in the directory /etc/httpd/'sites_disabled/.

    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.

Keywords: khelp ksa