Apache 2.2

pedz

Registered
I have Mac OS X Server 10.4.3 (the latest). For a completely unknown reason, I have a burning desire to switch to Apache 2.2. I'm also running PHP 5.1 and PostgreSQL 8.1. Has anyone tried Apache 2.2 on this forum? Is it going to interact well with the Mac OS X Server Admin GUI?

Thanks,
 
I'm hoping, first off, that you're not running this in a production environment ;).

I use a custom compile of Apache2 (2.0.54, IIRC), and the Mac Server Admin GUI does NOT interact well with it. In fact, it's generally considered a poor practice to even CONSIDER using Apple's GUI with anything other than the Apple-managed (through SWUpdate) Apache install. The reasons are thus:

1) You'll never be quite sure if you're not munging the files. Server Admin seems to do a pretty good job at stuff AS LONG AS you only interact through it. If you start editing the conf files manually (which, in things like the BIND interface, you have to in order to get at many features), Server Admin will act in an unexpected manner -- a def. bad thing for a server.

2) If you aren't stopped by what is considered a generally mediocre practice (above), realize that if you are editing files through Server Admin for a custom install, your install is most likely going to be overwritten by software update whenever a new Apache release / bugfix / patch is sent out by Apple. If you read the Apple MacOSXServer mailing list, people are always cautioning against the fact that Apple will overwrite your binaries, libraries, and even configuration files if you replace default Apple-installed files.

Again, for a development server, I'd say you're fine -- you lose nothing if it goes down. But, having been in that situation, it's pretty dang frustrating! For a production server, it's unacceptable to have the system act in an unexpected manner.
 
Here's how I keep my server setup and running (buyer beware, and all that).

I use fink for some packages that I've had notorious problems compiling (mainly OpenSSH). Fink installs (by default) to /sw, although it could just as easily be /usr/local. Unix directory structure would suggest /usr/local, but there are a few reasons I avoid that (mainly, sometimes packages will install to /usr/local. I would like to keep my production sw totally separate than anything else, so /sw works. Avoids confusion, keeps it cleaner, but this doesn't really matter).

So I install what I want with fink, into /sw, which yields the traditional ./bin/ ./lib/ ./share and all that. For software I compile myself (MySQL, PHP, Apache, a few other minor ones), I configure with the --prefix flag set. So, using apache for an example, let's say that I have 2.0.54 (stable) installed, running my production line website. Directory structure:
/sw/apache2.0.54
./bin
./sbin
./lib
./mod
... And all the other directories that apache installs. Out of curiousity (but remembering the lessons learned from the whole cat thing), I want Apache 2.2. Simple!

in the source directory, ./configure --prefix=/sw/apache2.2.xx

This will give you a structure like:
/sw/apache2.2.xx
./bin
./lib
and so forth.

Then I can play with apache2.2 all I want -- I usually set it up to use a different port than normal, open that port on my firewall, do an IP restriction, and try my damndest to break / crack / evaluate 2.2. If I like it, I just change a few conf files for startup to point towards apache2.2.xx, and the switch is made!

This is good for bugfixes, minor revisions, and evaluating new versions. You can also leave the old, stable, venerable apache installs there in case you need a quick rollback. If you do that, though, I recommend using Access Control Lists to make sure that someone doesn't manage to start the old apache and cause you conflicts.

Hope this helps one and all!

Cheers,
Travis
 
Back
Top