DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Compiling Apache2 Under Mac OSX Leopard

10.22.2008
| 9089 views |
  • submit to reddit
        Insert the following commands into the console after you have downloaded and unziped the Apache2 package.
It will configure and install.


sudo ./configure --prefix=/usr/local/apache2 --enable-access --enable-actions --enable-alias --enable-asis --enable-auth --enable-auth_dbm --enable-auth_digest --enable-autoindex --enable-cache --enable-cgi --enable-dav --enable-dav_fs --enable-deflate --enable-dir --enable-disk_cache --enable-dumpio --enable-env --enable-expires --enable-fastcgi --enable-file_cache --enable-headers --enable-imap --enable-include --enable-info --enable-log_config  --enable-log_forensic --enable-logio --enable-mem_cache --enable-mime --enable-mime_magic --enable-negotiation --enable-perl --enable-rewrite --enable-setenvif --enable-speling --enable-ssl --enable-status --enable-suexec --enable-unique_id --enable-userdir --enable-usertrack --enable-version --enable-vhost_alias --enable-so  --enable-module=all --enable-shared=max

sudo make

sudo make install


Once All that is installed open your ~/.bash_profile and insert the following line to be first in your PATH environment variable.

export APACHE2="/usr/local/apache2/bin"
export PATH="${APACHE2}:${PATH}"

once that is complete. You can start your apache server with the following command:
sudo httpd -k start
sudo httpd -k stop
sudo httpd -k restart