Apache server redirects using MacOS Server Admin

Note to self before I delete this entry.
This will redirect an entire site:
Server Admin -> Your server -> Web -> Your site -> Aliases -> Url Aliases and Redirects
Type = RedirectMatch
Pattern = .*
Path = http://example.com

ServerAdmin wipes changes to apache2/site/* files

If you change the configuration for any site using the Mac OS X Server Admin tool, it will rewrite every single site file in the /etc/apache2/site/ folder.   Do not change these by hand if you use this tool.
This is somewhat braindead as for example to use pretty permalinks in Wordpress you need AllowOverride FileInfo [...]

Getting PHP working in Apache2 on Mac OS X Leopard

As with OS X Leopard Server, the OS X Leopard standard OS is missing Apache config statements to enable PHP support. Of course with standard Leopard, you don’t get the fancy Server Admin tool to let us fix it via a GUI, so we do it by hand:
In /etc/apache2/httpd.conf:
Uncomment the php LoadModule statement:

LoadModule php5_module [...]

Installing mod_rails in Apache2

Phusion Passenger, a.k.a. mod_rails, is a Ruby on Rails server integrated tightly with apache.  Here is what I did to get it working on Mac OS X.
 Make sure you have gcc – on my Mac OS X system, the easiest way to get this is to install XCode tools.

sudo gem install passenger

Per the install instructions [...]

Getting PHP working in Apache2 on Mac OS X Server

In OS X Leopard, out of the box (at least on the System I got access to) Apache2 is missing an AddHandler statement for PHP, so PHP won’t work if you just enable the module.  Here is how to fix that through Server Admin:
Check -> Web -> Settings -> Modules, php5_module is enabled.
In Settings -> [...]

Apache “can’t reliably establish hostname”

To shut up apache when it’s complaining about “cant reliably establish hostname”, the response from /bin/hostname must match the first entry on the 127.0.0.1 line in /etc/hosts.