Thursday, May 07, 2009

Apache + Passenger + HTTP Basic

Say you've thrown together a simple demo application, thrown it out on the web, and now want to make sure that no one messes with the data before that big client looks checks out your demo and signs that big $$ contract. Being a demo - the quick and dirty way to get this up is to just throw in some HTTP Basic Authentication. With Apache + Passenger the way to do this is to add a Location directive inside your VirtualHost element:

You can configure HTTP Basic in a few different ways, but the above is usually what you are going to want.


  1. I tried this but keep getting the error:

    /path/to/htaccess/file: No such file or directory


  2. @Kevin, dude, stop fooling, some others might need a .htaccess tutorial but not you! For those of you, look here: