Home > Knowledge Base > Men & Mice Suite 5.5 and later > Mac OS X

Installing Men & Mice Web Interface on Mac OS X 10.3.x or 10.4.x

Problem

The Men & Mice Web Interface for Mac OS X requires Apache version 2.2. Mac OS X versions prior to 10.5 (Leopard) came bundled with Apache 1.3, which is not supported. Therefore, an automated installer for Mac OS X 10.3 and 10.4 is not possible, because there is no standard installation of Apache 2.2 for these operating systems.

The instructions in this article can also be used by users of Mac OS X 10.5 who do not wish to use the standard Apple installation of the Apache web server.

Solution

This article describes how to compile, install, and configure the Apache web server, version 2.2, from source code. It then describes how to install the Men & Mice Web Interface into this installation.

The procedure requires use of shell commands. If you’re not sure how to do that, then this article is probably too advanced for you.

Throughout this article, the user is free to alter the filesystem paths used in the steps described.

Prerequisites

You must have Apple’s XCode Tools installed. Before installing, make sure that no other web server is running on the selected port.

Source Code

Point your web browser to the Apache httpd downloads page. This will automatically suggest a nearby mirror. Scroll down to “Unix Source” and download the .tar.bz2 version of the Unix source.

Unpack the archive with this command:

tar xjf httpd-2.2.*.tar.bz2
cd httpd-2.2.*

Compile and Install Apache

config.layout

The first step of compiling the source code is to modify a file named “config.layout”, to add a custom file layout. Execute the following:

cat >> config.layout << EOF
# Men & Mice layout
<Layout mmsuite>
    prefix:        /Library/menandmice/apache
    exec_prefix:   \${prefix}
    bindir:        \${exec_prefix}/bin
    sbindir:       \${exec_prefix}/bin
    libdir:        \${exec_prefix}/lib
    libexecdir:    \${exec_prefix}/modules
    mandir:        \${prefix}/man
    sysconfdir:    \${prefix}/conf
    datadir:       \${prefix}
    installbuilddir: \${datadir}/build
    errordir:      \${datadir}/error
    iconsdir:      \${datadir}/icons
    htdocsdir:     \${datadir}/htdocs
    manualdir:     \${datadir}/manual
    cgidir:        \${datadir}/cgi-bin
    includedir:    \${prefix}/include
    localstatedir: \${prefix}
    runtimedir:    \${localstatedir}/logs
    logfiledir:    \${localstatedir}/logs
    proxycachedir: \${localstatedir}/proxy
</Layout>
EOF

Note that everything is going into /Library/menandmice/apache.

configure and make

Compile the software:

./configure \
  --enable-layout=mmsuite \
  --enable-mods-shared="all ssl" \
  --with-mpm=worker && \
make

Install

Execute the following as either root or an admin user:

make install

httpd.conf

Configure httpd.conf. The installer has provided a starting point, at /Library/menandmice/apache/conf/httpd.conf. The same file also exists in the originals subdirectory of that same location, so you can freely replace or alter the working copy without worrying that you’ve lost vital information.

Assuming you’ve followed the steps above exactly, a minimalist httpd.conf is available here: httpd.conf. Be sure to look at the following directives and customize as needed:

Listen 80
ServerAdmin webmaster@example.com
#ServerName www.example.com:80

Configuration of SSL is possible but is left as an exercise for the reader. There is a section for SSL right near the bottom of the configuration file.

Men & Mice Web Interface Installer

Get the Men & Mice Web Interface manual installer package. Run the installer, which will open a folder. Copy this folder into /Library/menandmice/ and rename it webint. This folder contains:

mmwebext.conf
mod_mmwebext.so
menandmice

The last item is a folder of HTML and related files.

Configure

Execute the following to configure the web interface configuration:

cd /Library/menandmice/webint
mv mmwebext.conf{,.orig}
sed -e 's|/usr/libexec/apache2|/Library/menandmice/webint|' \
  -e 's|/Library/WebServer/Documents|/Library/menandmice/webint|' \
  mmwebext.conf.orig > mmwebext.conf

If you are not using the httpd.conf attached above, be sure to add this line somewhere in your httpd.conf:

include /Library/menandmice/webint/mmwebext.conf

Start httpd

Start httpd manually:

/Library/menandmice/apache/bin/apachectl graceful

If there are any errors, it will tell you. Otherwise, httpd will be started and the web interface will be available.

Configure httpd to start automatically

Apple provides a handy startup item for the Apache web server, but it needs to be updated, and then it needs to be enabled. You’ll need to be root for this.

sudo -s
cd /System/Library/StartupItems/Apache
mv Apache{,.orig}
sed -e 's|apachectl|/Library/menandmice/apache/bin/apachectl|' \
  -e 's|apachectl restart|apachectl graceful|' \
  Apache.orig > Apache
rm Apache.orig
cd /etc
mv hostconfig{,.orig}
sed -e 's|WEBSERVER=-NO-|WEBSERVER=-YES-|' \
  hostconfig.orig > hostconfig
rm hostconfig.orig
exit