Built-in Apache 2

From Mac OS X Server FAQ

Jump to: navigation, search

Your default install of OS X Panther Server has Apache 2 installed by default. It lives in the /opt directory.

If you are thinking of migrating your built-in Apache 1 server to use the supplied Apache 2, you should be aware that you will not be able to use the Server Admin tool to monitor or administer Apache 2. You will have to do all configuration through the terminal, so you should be familiar with the UNIX portions of OS X.

If you still want to go ahead, here's a quick and dirty guide to setting up Apache 2: (Note: If you need help with any of these topics, you should research them independently, and then return to this article.)

  1. You should add the /opt/apache2/bin directory to your shell's $PATH.
  2. (Optional, but recommended) You should rename your existing Apache 1 /sbin/apachectl to avoid conflicts with the Apache 2 apachectl. (Do not delete the Apache 1 version - you may need it later!)
  3. Ensure that all options are properly configured in /opt/apache2/conf/httpd.conf.

You may also wish to note that (at least when I tried it) there were still some incompatibilities between the way Apple compiled the preinstalled Apache2 and PHP. You may need to recompile Apache2 in order to clear these up.

Personal tools
Toolbox