<?xml version="1.0" encoding="UTF-8"?>
<OAI-PMH xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.openarchives.org/OAI/2.0/">
  <responseDate>2010-03-11T05:56:20Z</responseDate>
  <request identifier="oai:kete.net.nz:documentation:Topic:125" verb="GetRecord" metadataPrefix="oai_dc">http://kete.net.nz/documentation/topics/show/125-add-your-kete-application-to-etchosts-or-via-ghost-gem</request>
  <GetRecord>
    <record>
      <header>
        <identifier>oai:kete.net.nz:documentation:Topic:125</identifier>
        <datestamp>2010-03-03T01:23:59Z</datestamp>
      </header>
      <metadata>
        <oai_dc:dc xmlns:dcterms="http://purl.org/dc/terms/" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/">
          <dc:identifier>http://kete.net.nz/documentation/topics/show/125-add-your-kete-application-to-etchosts-or-via-ghost-gem</dc:identifier>
          <dc:title>Add Your Kete Application to /etc/hosts or via ghost gem</dc:title>
          <dc:publisher>kete.net.nz</dc:publisher>
          <dc:description><![CDATA[Set up a local (your host only) DNS entry for your Kete application.  Useful for development and demonstration Kete applications.]]></dc:description>
          <dc:description><![CDATA[Originally written by Walter McGinnis, Kete Project Lead for Katipo Communications, Ltd.
&nbsp;
An appendix of the Installation Guide
When in development or doing a demo on our local machine, I find it a nice convenience to able to support different hostnames for different projects listening on port 80 like normal web requests rather than localhost and a port number.
Using Ghost Gem (for *nix based OS's - linux/mac)
If editing a system file something you don't want to do, then there a tools that can do a similar job without touching the hosts file.
Firstly, make sure Ruby is installed. Secondly, install&nbsp;B Jeanes Ghost gem:
$ sudo gem install ghost
For conveniance, also add this to your .profile or .bash_profile files:
alias hosts='ghost'
Then type 'hosts' into the command line for instructions.
Using the examples in the first section, you would then just type
ghost add your_hostname
and it will automatically setup 'your_hostname' to point to localhost without you having to edit any files manually.
Alternative: Configure /etc/hosts
Important Note:&nbsp;This step assumes that you have correct privileges to edit the /etc/hosts file on your host.
As long as your webserver configuration match the hostname you want to use, you simply need to edit /etc/hosts (with root permissions) and add an entry on it's own line right after the locolhost entry.  Like so:
...127.0.0.1	localhost127.0.0.1	your_hostname...
 
"your_hostname" should be the address for the Kete application, as in your /usr/local/nginx/conf/nginx.conf server_name setting.  Thus if you put "127.0.0.1 my.domain.com" in /etc/hosts, all requests from your host to "my.domain.com" would point back at your host.  You can, of course, do this for multiple hostnames.
]]></dc:description>
          <dc:date>2008-01-06T11:56:37Z</dc:date>
          <dc:creator>Walter McGinnis</dc:creator>
          <dc:creator>walter</dc:creator>
          <dc:contributor>Walter McGinnis</dc:contributor>
          <dc:contributor>walter</dc:contributor>
          <dc:contributor>Kieran P</dc:contributor>
          <dc:contributor>kieran</dc:contributor>
          <dc:description/>
          <dc:subject><![CDATA[Installation]]></dc:subject>
          <dc:relation>http://kete.net.nz/documentation/topics/show/114</dc:relation>
          <dc:type>InteractiveResource</dc:type>
          <dc:subject><![CDATA[Kete]]></dc:subject>
          <dc:subject><![CDATA[install]]></dc:subject>
          <dc:subject><![CDATA[documentation]]></dc:subject>
          <dc:subject><![CDATA[setup]]></dc:subject>
          <dc:subject><![CDATA[/etc/hosts]]></dc:subject>
          <dc:subject><![CDATA[hostname]]></dc:subject>
          <dc:rights>http://creativecommons.org/licenses/by-sa/3.0/nz/</dc:rights>
          <dc:format>text/html</dc:format>
          <dc:coverage>Topic</dc:coverage>
        </oai_dc:dc>
      </metadata>
      <kete>
        <related_items topics="1"/>
      </kete>
    </record>
  </GetRecord>
</OAI-PMH>
