Apache20 version 2.0.63 - How to Download and Install on Mac OS X
Friday the 20th of November, 2009

    apache20  most recent diff


    version 2.0.63

      View the most recent changes for the apache20 port at: apache20.darwinports.com/diff
      Scroll down toward the bottom of the page to get installation instructions for apache20.
      The raw portfile for apache20 2.0.63 is located here:
      http://apache20.darwinports.com/dports/www/apache20/Portfile
      Find related portfiles with the unique DarwinPorts.com search feature.
      Check for any related Fink projects here: pdb.finkproject.org/pdb/package.php/apache20


      The apache20 Portfile 58843 2009-10-06 06:56:01Z ryandesign macports.org $

      # Besides having a Port for the Apache 2.0.x line, this Port was built
      # to allow Apache 2.x.y on Mac OS X 10.3 to serve PHP Zend encoded
      # files using the Zend Optimizer. The Zend Optimizer is distributed
      # only in binary form as an Apache module that enables the server to
      # serve optimized and obfuscated PHP code from third party vendors.
      # Since the Optimizer is a binary module, it must run in a binary
      # compatible OS and Apache environment.
      #
      # While newer versions of the Zend Optimizer do work with Apache
      # 2.2.x, it appears that these binary modules are compiled on 10.4 and
      # trying to load the module into Apache on 10.3 results in missing
      # symbol errors. When older versions of the Zend Optimizer that work
      # on 10.3 are loaded into Apache 2.2.x, then the error_log will have
      # messages about double free memory errors. So the only combination
      # that works on 10.3 is with Apache 2.0.x.

      PortSystem 1.0

      Name: apache20
      Version: 2.0.63

      Category: www
      Maintainers: blair
      Description: The extremely popular second version of the Apache http server
      Long Description: Apache is an HTTP server designed as a plug-in replacement for the NCSA server version 1.3 (or 1.4). It fixes numerous bugs in the NCSA server and includes many frequently requested new features, and has an API which allows it to be extended to meet users' needs more easily. This Portfile is not the latest version of the Apache web server, see the apache2 port. Besides having a Port for the Apache 2.0.x line, this Port was built to allow Apache 2.x.y on Mac OS X 10.3 to serve PHP Zend encoded files using the Zend Optimizer. The Zend Optimizer is distributed only in binary form as an Apache module that enables the server to serve optimized and obfuscated PHP code from third party vendors. Since the Optimizer is a binary module, it must run in a binary compatible OS and Apache environment. While newer versions of the Zend Optimizer do work with Apache 2.2.x, it appears that these binary modules are compiled on 10.4 and trying to load the module into Apache on 10.3 results in missing symbol errors. When older versions of the Zend Optimizer that work on 10.3 are loaded into Apache 2.2.x, then the error_log will contain messages about double free memory errors. So the only combination that works on 10.3 is with Apache 2.0.x.

      Homepage: http://httpd.apache.org/
      Platform: darwin freebsd openbsd

      Master Sites: apache:httpd
      distname httpd-${version}
      Checksums: md5 c7924ebe95f9f66c9f80c0f9d4012152 sha1 20e2b64944e38e96491af788a37cb709d2c5b755 rmd160 f6a7de59860f627ac40b245fcf742fb07e1b4870
      use_bzip2 yes

      depends_lib port:apr0 port:apr-util0 port:expat port:openssl port:pcre

      Patch Files: patch-httpd-std.conf.in

      platform darwin {
      post-patch {
      # Customize userdir naming to match darwin
      reinplace "s|/home/|/Users/|g" ${worksrcpath}/docs/conf/httpd-std.conf.in
      reinplace "s|public_html|Sites|g" ${worksrcpath}/docs/conf/httpd-std.conf.in
      }
      }

      platform darwin 7 {
      pre-configure {
      system "cd ${worksrcpath} && glibtoolize --force"
      }
      }

      configure.pre_args --prefix=${prefix}/${name}
      configure.args --with-apr=${prefix}/bin/apr-config --with-apr-util=${prefix}/bin/apu-config --libdir=${prefix}/lib --with-pcre=${prefix} --mandir=${prefix}/share/man --enable-mods-shared=all --enable-ssl --with-ssl=${prefix} --enable-cache --enable-disk_cache --enable-file_cache --enable-mem_cache --enable-deflate --enable-proxy --enable-proxy-connect --enable-proxy-http --enable-proxy-ftp

      post-configure {
      # Setting DYLD_FALLBACK_LIBRARY_PATH instead of DYLD_LIBRARY_PATH
      # avoids issues with library collisions (bug #3013)
      reinplace "s|DYLD_LIBRARY_PATH|DYLD_FALLBACK_LIBRARY_PATH|g" ${worksrcpath}/support/envvars-std
      }

      destroot.violate_mtree yes

      post-destroot {
      set confDir ${destroot}${prefix}/apache20/conf
      file rename -force ${confDir}/httpd.conf ${confDir}/httpd.conf.sample

      destroot.keepdirs ${destroot}${prefix}/apache20/logs

      # fix libtool path
      reinplace "s|/apache20/build/libtool|/share/apr-0/build/libtool|g" ${destroot}${prefix}/apache20/build/config_vars.mk

      set mandir ${destroot}${prefix}/share/man/man1
      file rename -force ${mandir}/dbmmanage.1 ${mandir}/dbmmanage20.1
      file rename -force ${mandir}/htdbm.1 ${mandir}/htdbm20.1
      file rename -force ${mandir}/htdigest.1 ${mandir}/htdigest20.1
      file rename -force ${mandir}/htpasswd.1 ${mandir}/htpasswd20.1

      set mandir ${destroot}${prefix}/share/man/man8
      file rename -force ${mandir}/ab.8 ${mandir}/ab20.8
      file rename -force ${mandir}/apachectl.8 ${mandir}/apachectl20.8
      file rename -force ${mandir}/apxs.8 ${mandir}/apxs20.8
      file rename -force ${mandir}/httpd.8 ${mandir}/httpd20.8
      file rename -force ${mandir}/logresolve.8 ${mandir}/logresolve20.8
      file rename -force ${mandir}/rotatelogs.8 ${mandir}/rotatelog20.8
      file rename -force ${mandir}/suexec.8 ${mandir}/suexec20.8
      }

      platform openbsd {
      build.env-append "LD_LIBRARY_PATH=${prefix}/lib"
      }

      Variant: openldap description {Enable LDAP support through OpenLDAP} {
      configure.args-append --enable-ldap --enable-authnz-ldap
      depends_lib-append port:openldap
      }

      Variant: preforkmpm conflicts workermpm description {Use prefork MPM} {
      configure.args-append --with-mpm=prefork
      }

      Variant: workermpm conflicts preforkmpm description {Use worker MPM} {
      configure.args-append --with-mpm=worker
      }

      if {![variant_isset workermpm] && ![variant_isset eventmpm]} {
      default_variants +preforkmpm
      }

      Variant: no_startupitem description {Do not create a startup item} {
      startupitem.create no
      }

      startupitem.create yes
      startupitem.start "\[ -x ${prefix}/apache20/bin/apachectl \] && ${prefix}/apache20/bin/apachectl start > /dev/null"
      startupitem.stop "\[ -r ${prefix}/apache20/logs/httpd.pid \] && ${prefix}/apache20/bin/apachectl stop > /dev/null"
      startupitem.restart "\[ -r ${prefix}/apache20/logs/httpd.pid \] && ${prefix}/apache20/bin/apachectl restart > /dev/null"

      livecheck.type regex
      livecheck.url ${homepage}
      livecheck.regex {Apache (2\.0(?:\.\d+)*) Released}

    If you haven't already installed Darwin Ports, you can find easy instructions for doing so at the main Darwin Ports page.

    Once Darwin Ports has been installed, in a terminal window and while online, type the following and hit return:


      %  cd /opt/local/bin/portslocation/dports/apache20
      % sudo port install apache20
      Password:
    You will then be prompted for your root password, which you should enter. You may have to wait for a few minutes while the software is retrieved from the network and installed for you. Y ou should see something that looks similar to:

      ---> Fetching apache20
      ---> Verifying checksum for apache20
      ---> Extracting apache20
      ---> Configuring apache20
      ---> Building apache20 with target all
      ---> Staging apache20 into destroot
      ---> Installing apache20
    - Make sure that you do not close the terminal window while Darwin Ports is working. Once the software has been installed, you can find further information about using apache20 with these commands:
      %  man apache20
      % apropos apache20
      % which apache20
      % locate apache20

     Where to find more information:

    Darwin Ports



    Lightbox this page.