i’m embarking upon a big server migration moving from a “co-lo” to cloud-based VPS hosted solution. the cloud provider i’m going with is linode. my first attempt at launching an instance of a VM failed and i had to contact their customer support.
their online customer support migrated me from one box to another and i was up and running quickly thereafter. the CS rep responded to my online support ticket within 30 minutes of opening it, so that seemed pretty good.
so far, i’m pretty impressed with linode. all of the pain of being a sysadmin, however, is coming back to me and what’s worse is that i’ve decided that i really want to complicate the architecture of my little box…because i can.
this box largely is responsible for hosting several wordpress blogs, but it’s also home to some personal projects. most of the legacy stuff is all LAMP-based so once i get wordpress working, everything else should hopefully fall into place.
the one wrinkle in this is that i really want a good playground with some node.js projects i have in the background. i’ve decided to reverse proxy all requests coming into this box with haproxy. nginx is so much simpler to setup for this kind of straightforward proxying, but i really love the admin stats that haproxy provides.
haproxy is working great now, it always takes me a while to fiddle with it before i get it just right:
log 127.0.0.1 local0 notice
errorfile 400 /etc/haproxy/errors/400.http
errorfile 403 /etc/haproxy/errors/403.http
errorfile 408 /etc/haproxy/errors/408.http
errorfile 500 /etc/haproxy/errors/500.http
errorfile 502 /etc/haproxy/errors/502.http
errorfile 503 /etc/haproxy/errors/503.http
errorfile 504 /etc/haproxy/errors/504.http
acl nodejs path_reg ^/node/?.*$
use_backend node if nodejs
server web1 127.0.0.1:8080 check
server web1 127.0.0.1:8081/node check
stats uri /haproxy?stats
stats realm Strictly\ Private
stats auth username:password
we’ll call it a day there.