Basic Authentication with Apache 2.2.*, mod_proxy_balancer, and Mongrel 

Filed under: Blogroll on Thursday, September 6th, 2007 by jeremy | Comments Off

Clients frequently like to keep applications under development behind some kind of basic authentication. Apache makes this easy, but mod_proxy_balancer complicates things slightly. While you normally put your AllowOverride, AuthType, etc. directives under the correct Directory definition, if you try doing this alone with a Rails app running on a mongrel cluster, you’ll see it doesn’t work. Instead, you’ll get an authentication dialog for each resource on the page (stylesheet, pictures, etc.) and it will still allow you through to the code! Probably has something to do with the URL rewriting going on to make the cluster proxying possible (which doesn’t happen in the Directory clause).

The solution was found here: put your authentication directives in the proxy definition itself:

<Proxy balancer://my_awesome_cluster>
BalancerMember http://127.0.0.1:9000
BalancerMember http://127.0.0.1:9001
BalancerMember http://127.0.0.1:9002
BalancerMember http://127.0.0.1:9003
AllowOverride AuthConfig
AuthType Basic
AuthName "Top Secret, biotch"
AuthUserFile /etc/apache2/authorized_users.passwd
Require valid-user
</Proxy>

That’ll put the kibosh on broke ass mahfuckahz. Hope this helps somebody.

A Slice of Life 

Filed under: Blogroll on Friday, August 24th, 2007 by jeremy | Comments Off

Yeah, so not a lot of interesting thoughts coming out of my blog these days. Well, right now I’ve got four jobs going on at once, so my free time is pretty expensive lately. The most important one right now is a custom Rails application that I’ve pledged to have beta-ready in less than two weeks. So far, I’m doing pretty good - mostly fleshing out the data model into MVC fanciness and setting up the Subversion repository and a development hosting environment. Yes, I bought another Ubuntu Dapper slice.

With the likely demands of this application, I’ll need full license to tune this thing, so SliceHost is a good choice. Though they’re not the most helpful guys out there, they at least don’t get in your way. Since this is the second time I’ve configured a slice, I thought I’d drop some hints on what got me here. I can’t claim that I followed all these instructions to the letter (in fact, I took some major liberties), but they did give me guidance on setting up my machine:

  • Start with PickledOnion’s Ubuntu setup instructions, as there’s a great introduction to securing the server from intruders.
  • Since I need to run Apache 2.2 (in order to run mod_proxy_balancer with Mongrel), I can build Apache on my own or upgrade to Feisty and pull 2.2.3 off the repository. Follow the instructions here but if you need SSL support be aware that apache_ssl_certificate is broken.
  • Next step is to get your Subversion repository up and running. I recommend these instructions but couldn’t get SSL or WebSVN working with my self-signed fake-o certificate, so feel free to remove the SSL stuff and just run on port 80 with basic authentication. Oh well.
  • Toolman Tim has a great script (which I simply followed manually) for starting a new edge Rails project with Subversion, Piston, and Capistrano.

That should get you all the way to where I am, which is actually writing code now. By the way, this multiple selects form plugin looks awesome (found it here but the repository address listed doesn’t work. I found a working one on Google Code). It’s a way to tie drop-down select boxes who have a foreign key relationship together. Make a selection in the parent drop-down, and it filters by the selection in the child drop-down. And I thought I was gonna have to get all RJS on it.

Congratulations to Megan and Jim! 

Filed under: Blogroll on Sunday, August 19th, 2007 by jeremy | Comments Off

What a wonderful day everybody had yesterday at the marriage of Jim and Megan. Yesterday at the wedding, Megan’s maid of honor spoke on how the sincerity and warmness of Jim and Megan’s relationship so infectiously spreads among their friends and even catalyzes new friendships in the wake of their love. I really couldn’t have said it better (indeed, her version of the idea was much less tortured sounding!). I’m so proud of and happy for them and the awesome, beautiful life they’re going to have together!

Monday Roundup 

Filed under: Blogroll on Monday, August 13th, 2007 by jeremy | Comments Off

Welp, I’m back from the Hoedown and it was a blast. Thanks to Jon, Jim, and Patrick for the company on the near-3 hour drive. There were some wonderful presentations, including one on MERB, tuning Ruby using C, and some reflections on the state of the Ruby community. These coming weeks I’m going to need to knuckle down and blast out code, but being able to see the exciting stuff people are thinking about and doing in the community is awesome. The conference was superbly organized and at $100 a killer value. Looking forward to next year!

BTW, check out this hilarious poster we saw at the gas station we stopped at on the way to and from the conference. Mecklenburg County reprazent!

G’s up, Hoedown 

Filed under: Blogroll on Thursday, August 9th, 2007 by jeremy | Comments Off

Welp, here’s the update on my professional life. I’m working on three contracts, so money is coming in. Hopefully, this money will make the search for a new employer less urgent and allow me to be picky. Additionally, one of these gigs is going to be a fast-paced, agilely developed Rails application for a new political action committee (what’s the emoticon for irony?). I’m excited.

Of course, in the next month or two I’d like to find a full-time job. My ideal position is a small, agile organization where people play roles when necessary instead of clinging to titles. I’d like to play more of a lead developer role - it’s high time for me to stop simply taking orders and start participating in a greater diversity of architectural, business, and strategic decisions in the software biz. For a long time, I’ve felt I’ve had too much yet to learn to take on a great deal of responsibility. No more - I’m ready.

If Tasha and I were better positioned financially, I might go it my own, but it’s just as well - I could stand a bit more experience. And I still intend to continue freelancing on the side, so I can take the move to self-employment gradually. But it’s been absolutely exhilarating to see how much opportunity is out there, and anyway I was getting too complacent for my own good. Only risks yield the big rewards in the market.

Tomorrow I’m headed down to Raleigh with my buds from the Central Virginia Ruby Enthusiasts Group (site’s down) for the Ruby Hoedown where I hope to meet some interesting people and learn about non-Rails applications of Ruby. I’ve already been using Ruby to write scripts for a friend’s business, and it’s a blast. I’m particularly hoping to talk to somebody about cross-platform GUI libraries for desktop app development with Ruby. If you’re there, holla atcha boy.

In the twinkling of an eye 

Filed under: Blogroll on Friday, August 3rd, 2007 by jeremy | Comments Off

Looking back at the beginning of this week, I marvel at the relatively secure position in life I enjoyed - content but static. There wasn’t much on the horizon to indicate that I would be making any giant strides forward, but I could comfortably tread water indefinitely.

Now at the end of the week, the world has turned upside down. I’m suddenly unemployed, the future is wide open, and I’m more excited and energized about life than I’ve been in years. I found a freelance gig within hours of being laid off that couldn’t have been more tailored to my situation, and beyond that I have the freedom to head in any direction I choose.

Life’s weird… and wonderful.

On the way back home 

Filed under: Blogroll on Monday, July 23rd, 2007 by jeremy | Comments Off

This blog post coming to you from the train taking Tasha and me home from New York. I finally got the unlimited data plan on my cell, so I can use the ‘net without guilt!

Anyway, I had a pretty good stay in the city overall. The only thing I’ll say bad is that the subways go to shit on the weekends, especially for where we were staying (Wall Street, which is understandable, as that whole district kind of shuts down when the markets aren’t open). Trips on the subway took way too long, between waiting for trains, trains being rerouted and not going where they said they were, and trains suddenly only going in one way. I guess it’s something you get used to, but it makes it hard to enjoy yourself when you’re constantly having to be prepared to make a split second decision to jump off a train because - well whaddaya know!?!? - it’s the totally wrong choice, regardless of what the sign said.

On Saturday I escorted Tasha to her Etsy class / trunk show in Brooklyn, which was modestly successful. I then managed to get back to Manhattan to check out the Neue Gallery (all German/Austrian art) and the Met (only the Greek, Roman, Mayan, and African art, unfortunately - that place is just too big!). I then got horribly lost picking Tasha up, but was able to retrieve her, bring her back to the hotel, and take her to a great meal in Little Italy (thanks, nymag.com!).

Sunday, Tasha went to Etsy on her own while I sought out my friend Jamie. He lives in a cute part of Williamsburg and seems to like it there just fine. He spends his time between doing camera work for the Paula Dean show in Georgia and hanging in New York. We used to be in a band together, and it was cool to catch up and share tips on anime (looking forward to checking out more Samurai Champion).

Once pre-gaming was done we headed out to a local free show they had at a massive, unfilled pool. Band of Horses headlined and it was pretty good. Afterwards, Tasha and I ambled into a Polish restaurant that kicked ass - authentic, cheap, and delicious (the Ukranian borscht is to die for). I really think that was the point where I saw just how awesome it is to live in an area with that much variety in food.

All in all, great trip. I’m not sure if it’s the novelty or what, but New York ain’t as bad as I’ve always thought. Maybe that’s because we did it right this time - no driving - and I wasn’t on a class trip where I couldn’t do what I wanted. The train is nice - it’s longer, but chiller, and I can get work done without panicking about delayed flights and dumbass TSA employees. I was afraid I wouldn’t find anything to do in New York, but it ended up that there was far too much to do, even for somebody as boring as me. And now that we’re aware of two people with whom we can stay in the city, I’m all about heading up there again in the near future.

By the way, I highly recommend the place we stayed, Club Quarters at the intersection of William and Wall. Ridiculously cheap, clean and unobtrusive, and in a safe neighborhood (around the stock exchange with all the military guards). I’m very impressed - apparently it sells memberships to corporations and uses that to subsidize weekend travel for families. Now that’s the kind of subsidy this libertarian can dig!

If you gave up on emailing me… 

Filed under: Blogroll on Saturday, July 21st, 2007 by jeremy | Comments Off

All of my email addresses (jeremy@_______) have been restored. No thanks to my host or GoDaddy.

Up on SliceHost 

Filed under: Blogroll on Tuesday, July 3rd, 2007 by jeremy | No Comments

Well, I’ve finally got my first site moved to Slicehost - this one. For the first time I’m running my own server and configuring it from scratch. I’m trying to walk a middle ground between following tutorials in a rote manner and doing my own thang. I would only recommend this host to a power user, ideally somebody who has a very specific configuration in mind. Since I wanted a playground for Rails apps, though, I wanted full control of the server’s setup, so this is right up my alley. And hopefully this service will give me room to expand, as I have a few different projects going right now.

Cookout on Saturday 

Filed under: Blogroll on Monday, June 4th, 2007 by jeremy | Comments Off

To all those whose address I wasn’t able to remember, we’re having a party and cookout at our place on Saturday, June 9 from 4:00 PM till whenever. If you’d like to come, please let me know via email.