<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed><type>rich</type><version>1.0</version><provider_name>phorkie</provider_name><provider_url>https://p.cweiske.de/</provider_url><title>Local Phorkie Setup for Mac OSX</title><author_name>Christian Weiske</author_name><cache_age>86400</cache_age><width>900</width><height>900</height><html>&lt;!-- embedding all files of https://p.cweiske.de/123 --&gt;
&lt;link rel="stylesheet" href="https://p.cweiske.de/css/embed.css"/&gt;
&lt;div class="phork" id="123"&gt;
    &lt;div class="phork-file"&gt;
 &lt;div class="phork-content"&gt;
  &lt;div class="markdown"&gt;&lt;h1&gt;Local Phorkie Setup for Mac OSX&lt;/h1&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;hr /&gt;

&lt;h2&gt;Installing Phorkie&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;This step copies Phorkie to your local Sites directory.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Within &lt;strong&gt;Terminal&lt;/strong&gt;, add Phorkie to your Sites directory.
&lt;code&gt;sh
mkdir ~/Sites/phorkie&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Next, copy Phorkie to your Sites’ Phorkie directory.
&lt;code&gt;sh
cp phorkie-0.4.0.phar ~/Sites/phorkie&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;That’s it!&lt;/p&gt;

&lt;h2&gt;Configuring .phar files&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;This step makes your Apache installation recognize .phar files.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Within &lt;strong&gt;Terminal&lt;/strong&gt;, edit your PHP configuration file.
&lt;code&gt;sh
edit /etc/apache2/other/php5.conf&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Within your editor, add the &lt;code&gt;.phar&lt;/code&gt; extension to the &lt;code&gt;application/x-httpd-php&lt;/code&gt; type.
```conf
&lt;IfModule php5_module&gt;
  AddType application/x-httpd-php .phar .php
  AddType application/x-httpd-php-source .phps&lt;/p&gt;

&lt;p&gt;&lt;IfModule dir_module&gt;
    DirectoryIndex index.html index.php
  &lt;/IfModule&gt;
&lt;/IfModule&gt;
```&lt;/p&gt;

&lt;p&gt;That’s it!&lt;/p&gt;

&lt;h2&gt;Setting up your Host&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;This step makes your computer load &lt;a href="http://phorkie"&gt;http://phorkie&lt;/a&gt; from itself.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Within &lt;strong&gt;Terminal&lt;/strong&gt;, edit your Hosts file.
&lt;code&gt;sh
edit /private/etc/hosts&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Within your editor, add Phorkie as a Host entry.
&lt;code&gt;conf
127.0.0.1       phorkie&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;That’s it!&lt;/p&gt;

&lt;h2&gt;Setting up your VirtualHost&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;This step makes your Apache installation load &lt;a href="http://phorkie"&gt;http://phorkie&lt;/a&gt; from your local Sites directory.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Within &lt;strong&gt;Terminal&lt;/strong&gt;, edit your VirtualHosts file.
&lt;code&gt;sh
edit /private/etc/apache2/extra/httpd-vhosts.conf&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Within your editor, add a Phorkie VirtualHost (where %USERNAME% is your username).
&lt;code&gt;conf
&amp;lt;VirtualHost *:80&amp;gt;
  ServerName phorkie
  DocumentRoot "/Users/%USERNAME%/Sites/phorkie"
    &amp;lt;Directory "/Users/%USERNAME%/Sites/phorkie"&amp;gt;
        Options Indexes FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    &amp;lt;/Directory&amp;gt;
&amp;lt;/VirtualHost&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Within &lt;strong&gt;Terminal&lt;/strong&gt;, test your Apache configuration.
&lt;code&gt;sh
apachectl configtest&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Next, if this returns the message &lt;strong&gt;Syntax OK&lt;/strong&gt;, restart Apache.
&lt;code&gt;sh
sudo apachectl restart&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;That’s it!&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;Well done! Now you’re ready to play. Open &lt;a href="http://phorkie/phorkie-0.4.0.phar"&gt;http://phorkie/phorkie-0.4.0.phar&lt;/a&gt; from your web browser.&lt;/p&gt;
&lt;/div&gt;
 &lt;/div&gt;
 &lt;div class="phork-meta"&gt;
  &lt;a href="https://p.cweiske.de/123/rev-raw/b93eb5bbcd11339ff64d9f51abc59c83610217bc/README.md" style="float: right"&gt;view raw source&lt;/a&gt;
  &lt;a href="https://p.cweiske.de/123#README.md"&gt;README.md&lt;/a&gt;
 &lt;/div&gt;
&lt;/div&gt;
    &lt;div class="phork-file"&gt;
 &lt;div class="phork-content"&gt;
  &lt;div class="code"&gt;&lt;pre class="txt"&gt;fork, forking&lt;/pre&gt;&lt;/div&gt;

 &lt;/div&gt;
 &lt;div class="phork-meta"&gt;
  &lt;a href="https://p.cweiske.de/123/rev-raw/b93eb5bbcd11339ff64d9f51abc59c83610217bc/z-keywords.txt" style="float: right"&gt;view raw source&lt;/a&gt;
  &lt;a href="https://p.cweiske.de/123#z-keywords.txt"&gt;z-keywords.txt&lt;/a&gt;
 &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</html></oembed>
