home page | free evaluation | purchase info | search & support
Download NowDownload
Free Evaluation
Purchase NowPurchase
Full Version
Andromeda + Mac OS X

OS X ships with everything you need to run Andromeda: Apache (or "Personal Web Sharing") and PHP. You can even configure Andromeda to serve files downloaded from the iTunes Music Store (see bottom).

We'll start with a quick explanation of how to turn Apache and PHP on, and then we'll describe two different ways you might use Andromeda: from within your web root, and from your iTunes music folder.

Note: this doc assumes Mac OS X version 10.2.x and up.

Thanks to James Pelow of PHPmac.com for helping with this page. Note also PHPmac's doc: Enabling PHP on Mac OS X 10.3 Panther. Another handy site is Marc Liyanage's OS X/Apache/PHP page on entropy.ch.



1) Turn on Personal Web Sharing (Apache)

Open the Sharing pane of System Preferences, and start Personal Web Sharing.




2) Turn on PHP

From the Terminal, run the following commands (you'll need to be a user with Administrative privileges, and you'll be prompted for your password):

cd /etc/httpd
sudo apxs -e -a -n php4 libexec/httpd/libphp4.so

Versions of OSX earlier than 10.3 also need to run:
echo 'echo "AddType application/x-httpd-php .php" >> /etc/httpd/httpd.conf' | sudo sh -s

After you have enabled PHP, stop and restart Personal Web Sharing (back in the Sharing pane of System Preferences).




3) Andromeda in your default web root

Once you have Apache and PHP working, you're ready for Andromeda. Be sure to read the Getting Started guide, but here's a quick start:

Create a test folder anywhere within your web root, and drop in Andromeda:
/Library/WebServer/Documents/test/andromeda.php

Next, add some MP3 files (and/or subfolders of MP3s) and use Get Info to change the permissions of your test folder (be sure to 'Apply to enclosed items') to:

  • Owner: read/write
  • Group: read only
  • Others: read only
Or, if you prefer the Terminal:

chmod -R +rx /Library/WebServer/Documents/test/

Now you should be ready to access your Andromeda with:
http://{your_server}/test/andromeda.php




4) Andromeda & iTunes

You can also make your iTunes music folder directly available through Andromeda. The trick is to create a symlink pointing to your iTunes music folder.

Let's say that you want to access your iTunes music via Andromeda with:
http://{your_server}/test2/andromeda.php

In other words, you want 'test2' to map to your iTunes music folder, which is most likely here:
~/Music/iTunes/iTunes Music/

Simply put Andromeda in there:
~/Music/iTunes/iTunes Music/andromeda.php

And from the Terminal, run the following command:

echo 'echo "Alias /test2 \"$HOME/Music/iTunes/iTunes Music/\"" >> /etc/httpd/httpd.conf' | sudo sh -s

Finally, adjust the permissions:

chmod +x $HOME/Music/
chmod +x $HOME/Music/iTunes/
chmod -R +rx "$HOME/Music/iTunes/iTunes Music/"

Now you should be able to access your iTunes music via Andromeda with:
http://{your_server}/test2/andromeda.php




The iTunes Music Store

You can easily configure Andromeda to serve M4A and M4P files. Include those file types with audioFileTypes in your prefs file:

A sample andromedaPrefs.php file:
<?php
#siteName[tab] My Andromeda Name
#audioFileTypes[tab] mp3,m4a,m4p
?>




Need more help? James Pelow of PHPmac.com has been kind enough to offer Mac OS X help. You can send email to james@phpmac.com.

We welcome your feedback: info@turnstyle.com

Special thanks to Alf Eaton for inspiring and assisting with this document!

Andromeda home page | free evaluation | purchase info | search & support
©1999-2014 Scott Matthews, Turnstyle. All rights reserved.

www.turnstyle.com