Women in Technology

Hear us Roar



Article:
  Build Your Own Apache Server with mod_perl
Subject:   Why replace the Personal Web Sharing tests?
Date:   2002-11-11 13:23:19
From:   Theory
Response to: Why replace the Personal Web Sharing tests?

<blockquote> Just modify the built-in StartupItem to call your version of apachectl instead of the default location, and that way you can use the checkbox in System Preferences to control your version of Apache instead.</blockquote>


While this will work, there are a number of issues with it that you should be aware of:



  • The Apache you've compiled according to my instructions does not use the same configuration as Apple's. So, for example, unless you change the configuration to use Apple's, Personal Web Sharing won't actually work.

  • Should Apple update the Mac OS X version of Apache, there's a good chance that your changes to the Apple Apache startup script will be wiped out.

  • Everything in the /System directory hierarchy is technically for the OS only, so YMMV.


A better solution, offered by another attentive reader, is to leave the variable tests in, but rename them, e.g.,


if [ "${APACHE:=-NO-}" = "-YES-" ]; then


Then just add the new APACHE variable to the /etc/hostconfig file and you're in business.


Regards,


David

Full Threads Oldest First

Showing messages 1 through 2 of 2.

  • Why replace the Personal Web Sharing tests?
    2004-01-10 16:32:43  anonymous2 [View]

    Since we have a startup script for Apple's own Apache in /System/Library/StartupItems AND one for the new version of Apache in /Library/StartupItems won't this setup run into problems if we have both WEBSERVER and APACHE set to YES in hostconfig (or personal web serving set under system preferences), ie: at startup we are loading both Apple's Apache and the new one?
    • David Wheeler photo Why replace the Personal Web Sharing tests?
      2004-01-12 10:29:08  David Wheeler | O'Reilly Author [View]

      (Sorry I responded to the wrong message above. Here goes again...)

      Yes, the setup will run into problems, unless you set the Listen directive in either configuration's httpd.conf to listen on a different port.

      HTH,

      David