mikestanley wrote:
So I started trying to setup an SSH tunnel - thinking I could point either my browser or Marsedit to localhost:8081 to point to domain1.com, localhost:8082 to point to domain2.com, etc.
But that doesn't seem to work either, obviously, as each of those domains resolve to the same IP address, and even though Apache redirects http requests to domain1.com to /srv/www/domain1.com/public_html/ and domain2.com to /srv/www/domain2.com/public_html/ on the server - when I'm tunneling through to port 22, that redirection doesn't take place.
Not sure what you mean by this, but you shouldn't have to bind one local port to each of your websites. The virtual host is determined by the "Host:" header of your HTTP request, not the IP address or port of the server. Unless you set up old-fashioned IP-based virtual hosting, you should be able to point everything at localhost:8080 (forwarded to remote localhost:80).
But what is more likely is that WordPress is doing stupid things, as usual. Last time I checked, WordPress remembered the exact hostname where it was first installed. If you tried to access the same blog using any other hostname, WordPress would automatically redirect you to the hostname it remembered. In addition, all the navigation links are absolute. Somebody in the WordPress team probably thought that this was good for SEO or something. This stupid "feature" was a royal pain in the ass whenever migrating WordPress blogs from one host to another. It's also the reason WordPress doesn't play nicely with SSL. I haven't checked whether WordPress 3.x does this too, but I wouldn't be surprised if the same feature is messing up your fragile redirection scheme.
If you're the only person who needs to log into these blogs securely, the easiest way to do it is to use an SSH tunnel as a SOCKS proxy. No need to bind individual ports to individual sites, no need to change anything on the server side. Just set up dynamic port forwarding (the "-D" switch in the command line, or select "Dynamic" in Putty), and configure your web browser to use the forwarded local port as a SOCKS proxy. Browse the web as usual, and everything (except some Flash content) goes through the tunnel.