Skip to content

Ted Kulp

Polyglot Developer. Teacher. Curmudgeon.

  • Home
  • About
  • Blog
  • Home
  • 2012
  • May
  • Using Pagekite with Pow!

Using Pagekite with Pow!

Posted on 2012/05/052014/07/10 By Ted Kulp No Comments on Using Pagekite with Pow!
Programming

There are always situations where you need to display the work on your local maichine to the outside world. In the old days, we would setup a dyndns account, forward some weird port on our firewall to port 80 on our local machine, and give out the weird URL. Those, my friends were the dark ages.

Now we have services like Pagekite. Basically, Pagekite makes it stupid easy to make a tunnel from your local machine to a URL on the outside world. It handles all the traffic tunneling for you, which is really impressive. It can basically forward any port, which makes it great for SSL and stuff.

On my local machine, I use Pow! for all of my rails development. It basically makes http://anything.dev point to a local running rails instance. It’s been discussed before, so I won’t go into it. But, Pow! works by reconfiguring your local DNS and making anything with .dev point to your localhost and a weird port behind the scenes. It needs to know what the hostname is in order to know what site to use.

Since Pagekite gives you one URL (at least by default) that doesn’t end in .dev, Pow! will have no clue what site to serve when you go to your Pagekite URL and just give you a generic welcome message. I came up with a quick hack to work around this limitation.

Create (or modify if you have one) a ~/.powconfig file. In it, put the following:

export POW_EXT_DOMAINS=pagekite.me

Now, restart Pow! (I use Powify, so that’s just powify server restart for me). Then, create a new Pow! site for your current app that is the same name as your Pagekite hostname.

ln -s . ~/.pow/pagekitehostname

Voila! External page serving bliss. And if there’s a situation where you need to show a different app instead, you just change your pagekitehostname symlink to point to a different app instead. Easy!

Tags: mac pagekite servers

Post navigation

❮ Previous Post: Padrino and the Asset Pipeline
Next Post: Turn Twitter Favorites into an RSS feed ❯

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Promisify Javascript Events with Bluebird
  • Full Screen Google Analytics via Bookmarklet
  • A few reasons to use Underscore.js (or Lo-Dash)
  • Office Setup
  • Turn Twitter Favorites into an RSS feed

Recent Comments

  • Tom on Full Screen Google Analytics via Bookmarklet
  • Russell on Full Screen Google Analytics via Bookmarklet
  • Max on Full Screen Google Analytics via Bookmarklet
  • lars on Full Screen Google Analytics via Bookmarklet
  • Dan O'Keefe on A few reasons to use Underscore.js (or Lo-Dash)

Archives

  • August 2014
  • July 2014
  • October 2013
  • February 2013
  • May 2012
  • November 2011
  • August 2011

Categories

  • Productivity
  • Programming

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Copyright © 2021 Ted Kulp.

Theme: Oceanly by ScriptsTown