Topic: Add Your Kete Application to /etc/hosts

Topic Type: Topic

Set up a local (your host only) DNS entry for your Kete application. Useful for development and demonstration Kete applications.

Originally written by Walter McGinnis, Kete Project Lead for Katipo Communications, Ltd.

 

An appendix of the Installation Guide

Important Note: This step assumes that you have correct privileges to edit the /etc/hosts file on your host.

Configure /etc/hosts

Although when in development or doing a demo on our local machine we will probably only be running one mongrel instance at a time and we may start and stop that directly from the command line, 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.

As long as your Mongrel Cluster and Nginx 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	localhost
127.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.

Discuss This Topic

There are 0 comments in this discussion.

join this discussion

Creative Commons Attribution-Share Alike 3.0 New Zealand License
Add Your Kete Application to /etc/hosts by Walter McGinnis is licensed under a Creative Commons Attribution-Share Alike 3.0 New Zealand License