Skip to content

Instantly share code, notes, and snippets.

@dgouldin
Created September 24, 2012 21:29
Show Gist options
  • Save dgouldin/3778506 to your computer and use it in GitHub Desktop.
Save dgouldin/3778506 to your computer and use it in GitHub Desktop.

Tunneling a public URL to your local machine

On the public web server

Sample lighttpd conf:

$HTTP["host"] == "d.gould.in" {
  proxy.server = ( "" => ( ( "host" => "127.0.0.1",
                             "port" => 20020 ) ) )
}

On your local machine

Set up a reverse proxy ssh tunnel:

ssh -NR20020:127.0.0.1:8000 gould.in

Then run your local web server as normal:

./manage.py runserver 8000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment