David Ramsden – Network engineer, general geek, petrol + drum and bass head
2Feb/12

Virtual Hosting With mod_proxy

The other day I had someone ask if there's a nice solution to the following problem:

Multiple web development virtual machines but only one external IP address.

The quick solution is to port forward on different ports to each virtual machine. For example 81 goes to VM1, 82 goes to VM2, 83 goes to VM3 etc. Which granted, would work, but isn't a "neat" solution.

Using mod_proxy under Apache is a much better solution to this problem.

Deploy a "front-end" server running Apache and mod_proxy. Create a virtual host for each virtual server and then using mod_proxy, reverse proxy to the virtual server. Port forward from the WAN to your front-end Apache server running mod_proxy.

Here's what an example config would look like on the front-end Apache server:

Requests for cust1.dev.domain.com would be reverse proxied to 192.168.0.100 and requests for cust2.dev.domain.com would be reverse proxied to 192.168.0.101. All with one external IP address and one port forward rule.

Just one of the many uses of mod_proxy. You can also use it for SSL bridging and SSL offloading. Neat!

Tagged as: , 1 Comment
2Jan/12

Creating a HA iSCSI Target Using Linux

Some time ago I created a High Availability iSCSI target using Ubuntu Linux, iscsi-target, DRBD and heartbeat. The HA cluster consisted of two nodes and the iSCSI initiators were Windows Server 2008. I was able to mount the LUN and copy a video to it, play it back and then pull the power from the primary iSCSI target. A few seconds later the second iSCSI target took over and video continued to play.

Pretty cool, huh?

Here is my guide if you want to try this. Although I've not gone back through the guide to make sure it's correct. But if you spot anything that's wrong or not very clear, please leave a comment.

Tagged as: , , 8 Comments
30Dec/11

Nitter 2.0.1 Available – Fixes DMs

A very quick (and rare) update on my blog!

Since 25th May 2011, my Nitter script has been broke due to a change with the Twitter API. OK, so the problem was actually Net::Twitter::Lite so the changes to my script have been minimal as I've switched over to Net::Twitter (3.18001), which supports the new way of requesting friend and followers IDs.

You can grab Nitter 2.0.1 from the usual place.

Happy New Year! Hopefully you won't update Nitter and then be bombarded with alerts from your NOC over the holidays.

Tagged as: , No Comments
14Aug/10

Catching Up With An Old Friend, Ubuntu.

Since getting my iPhone some 18 months ago, I hardly turn on my desktop PC. I can do almost anything that I need to do on my iPhone. As a result my desktop PC had fallen in to a state of ruin. Last night I decided to try to tidy it up a little.

My desktop PC started out with Ubuntu 8.04 and I've upgraded each time a new release came out. As a result it had accumulated a lot of crap throughout the years. So I removed X and a lot of the CLI bits and bobs that I'd installed. Stripped it back to as much of a bare metal install as possible. Then used tasksel to install Ubuntu desktop and went from there.

It's all back up and running and I'm quite impressed with Ubuntu 10.04. I can't talk for other distributions but Ubuntu has made massive steps in the right direction over the years. I can now plug in my iPhone 4 and Rhythmbox will pop up and allow me to play my iTunes library. And the Gwibber social client is a great replacement for TweetDeck.

It's these simple things that will appeal to your average desktop user. Great work Ubuntu!

Tagged as: No Comments