EIMS FAQ

Question:

How do I configure Apache?


Answer

Most of the configuration of Apache is done using the Server Admin program. Apache fully supports hosting multiple domains on a single IP address. For a full list of documentation, visit the Apache web site.

There are times, however, when you may need to edit the configuration files directly. Typically, Apache uses a single configuration file called httpd.conf. Under MOSXS, a portion of the configuration (Virtual Hosts) is broken out into a custom file that the Server Admin program manipultes. These 2 files are located here:

/etc/httpd/httpd.conf
/etc/httpd/httpd_macosxserver.conf

You can edit these files using your favorite command line editor through the shell, or if you have access to the server, BBEdit Lite is an indispensable tool for this kind of thing.
Apple highly recommends that you do NOT edit the second file as it is directly manipulated by the Server Admin GUI so any changes you might make could disappear or cause problems for the Admin program, so be sure you know what you are doing before editing that file.

Some examples of changes to the configuration that might be needed:

  1. Binding Apache to a specific IP address (See the BindAddress directive)
  2. Adding a new log format.
  3. Adding a ServerAlias directive to a Virtual Host (to serve: "domain.com" and "www.domain.com")

Most cases, you will want to create your own separate file to place any custom configuration directives in and then place a single line in the httpd.conf file to include that file:

Include /private/etc/httpd/myhttpd.conf

This will save you from potentially losing your customizations when Apple releases an update to the server that overwrites the files.


FAQ Home | MacOSXS Home | Page last updated: