These instructions are intended to be used on Mac OSX Mountain Lion and Mavericks. They may also work for Yosemite, but have not been tested.
This step copies Phorkie to your local Sites directory.
Within Terminal, add Phorkie to your Sites directory.
mkdir ~/Sites/phorkie
Next, copy Phorkie to your Sites’ Phorkie directory.
cp phorkie-0.4.0.phar ~/Sites/phorkie
That’s it!
This step makes your Apache installation recognize .phar files.
Within Terminal, edit your PHP configuration file.
edit /etc/apache2/other/php5.conf
Within your editor, add the .phar
extension to the application/x-httpd-php
type.
<IfModule php5_module>
AddType application/x-httpd-php .phar .php
AddType application/x-httpd-php-source .phps
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
</IfModule>
That’s it!
This step makes your computer load http://phorkie from itself.
Within Terminal, edit your Hosts file.
edit /private/etc/hosts
Within your editor, add Phorkie as a Host entry.
127.0.0.1 phorkie
That’s it!
This step makes your Apache installation load http://phorkie from your local Sites directory.
Within Terminal, edit your VirtualHosts file.
edit /private/etc/apache2/extra/httpd-vhosts.conf
Within your editor, add a Phorkie VirtualHost (where %USERNAME% is your username).
<VirtualHost *:80>
ServerName phorkie
DocumentRoot "/Users/%USERNAME%/Sites/phorkie"
<Directory "/Users/%USERNAME%/Sites/phorkie">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Within Terminal, test your Apache configuration.
apachectl configtest
Next, if this returns the message Syntax OK, restart Apache.
sudo apachectl restart
That’s it!
Well done! Now you’re ready to play. Open http://phorkie/phorkie-0.4.0.phar from your web browser.