mass permalink update

This commit is contained in:
2015-02-06 11:57:13 -05:00
parent 0911977c1f
commit 4af973d000
336 changed files with 1121 additions and 1165 deletions

View File

@ -1,9 +1,9 @@
---
---
layout: post
title: Local development for external APIs
created: 1282323370
permalink: blog/walkah/local-development-external-apis
tags:
permalink: blog/walkah/local-development-external-apis/
tags:
- geek
- oauth
- howto
@ -11,9 +11,9 @@ tags:
---
Lately I have found myself doing a *lot* of development against external APIs, several of which require those services to be able to access my dev site directly. Traditionally, I've set up my dev sites on a public server (usually my personal VPS), mirrored the site locally, and used [rsync](http://www.samba.org/rsync/) to push incremental changes from my local machine to the server.
This is a pain for two reasons:
This is a pain for two reasons:
1. It means I have an extra step (to rsync) after each change. Yes, it's the same command over and over, but it gets repetitive. Also, if I forget, I spend a few minutes trying to figure out why the change I just made doesn't appear.
1. It means I have an extra step (to rsync) after each change. Yes, it's the same command over and over, but it gets repetitive. Also, if I forget, I spend a few minutes trying to figure out why the change I just made doesn't appear.
1. I'm also left with old dev sites (that I generally forget about) out on the public web - generally not getting proper attention for security updates, etc. This leaves my VPS open to attack.
I also spend a *lot* of time tweaking my local environment to be just-how-I-like-it(tm).
@ -31,8 +31,8 @@ Recently, I had an idea that, in hindsight, seems obvious. However, in talking w
Given the above, the rest is really quite simple (and perhaps obvious to some). A simple ssh port forward does the trick. Here's the command I use:
ssh root@home.example.com -R 80:localhost:80
For the unfamiliar, that says ssh into home.example.com as root and send all the traffic coming to port 80 at home to port 80 on my localhost.
For the unfamiliar, that says ssh into home.example.com as root and send all the traffic coming to port 80 at home to port 80 on my localhost.
Voila! Now all requests to home.example.com will come to my local server and I can setup vhosts, etc accordingly. Also, if I just end my ssh connection, I no longer have to worry about the big, scary Internet accessing my dev sites.