Subscribe To RSS Feed

Jeremy Dost's SharpBlog

Just another Sharpdot weblog

Archive for November, 2009

Sneak peek at the redesigned google search layout

- Wednesday, November 25th, 2009 -

Cool! Google blogoscoped has a javascript tweak that will let you in to the redesigned google search layout. It’s nice and simple and worked for me. Check it out here.

The date filters are great. They look like they’ll be a big help when searching for tech solutions especially when you want to only see fixes and how-tos for the most current versions of wordpress / drupal etc. They are available already but it takes a few clicks to get to it so this makes it a whole lot easier. It’ll be nice to see this go live for real sometime soon.

Posted in Uncategorized | No Comments »

cPanel, RoR Passenger and PHP in bed together

- Thursday, November 19th, 2009 -

I spent quite a lot of time pulling my hair out over this one but finally was able to massage cpanel so that our ruby on rails site which uses mod_rails / passenger would ignore a specific directory that we wanted to run a PHP app ( Drupal ) in. You CAN run php by default but you have to go to the script explicitly – i.e. going to /drupal/index.php was ok but /drupal/ threw and error. So the problem was two fold – figuring out how to tell passenger to ignore that entire directory and then how to get this configured in cpanel in the ‘proper’ way.

At first I got bogged down trying to get it to work with some url rewrites in the .htaccess file. It seemed logical but it didn’t work because passenger does it’s thing before .htaccess even kicks in. Besides, the best approach is to bypass passenger completely for that directory – better for optimizing and is really more true to what we were trying to setup.

After digging I discovered the ‘PassengerEnabled’ directive! I know RTFM. Just set PassengerEnabled off for that directory and we’re golden.

Now how to fit it into cpanel but just for this domain? Not as simple as it sounds. Editing the httpd.conf is of course NOT the right solution. Cpanel does expose some parts of the apache configuration in the admin but it’s not vhost specific so again it would affect all sites when I just wanted to change one. RTFM again and you’ll see there are some manual ways to insert things directly into the vhost. You have to manually create a series of directories (the userdata one at the top of the chain is not there by default) and put an override file named anything.conf in the right place.

In my setup i created the file override.conf here:

/usr/local/apache/conf/userdata/std/<vhost account number>/<cpanel user name>/<domain name>/override.conf

And put this in it (/drupal is the folder i want to run php in).

<Location /blog>
PassengerEnabled off

And now one more hitch…

Running /scripts/verify_vhost_includes like it says to in the cpanel docs said that my vhost file had an error!!! It said PassengerEnabled was not a valid directive. I ended up just giving it a shot anyways and was pleased to find that it worked just fine! I suspect that cpanel just doesn’t know this directive becuase it is specific to passenger. So you run:

/scripts/ensure_vhost_includes --user=<cpanel user name>

to rebuild the vhosts file for this user and restarts apache and voila!


Tags: , , ,
Posted in Uncategorized | No Comments »

Bulk App Installers – just in time for a Windows 7 install

- Wednesday, November 4th, 2009 -

Thanks again lifehacker - Allmyapps and Ninite are 2 very handy looking bulk app installers that let you build a bundle all of the free apps you use and then install them all at once. We’re going to upgrade to Windows 7 sometime in the near future and this will come in handy.

Here’s the writeups on all my apps and ninite

Posted in Uncategorized | No Comments »

Drupal – the official national CMS tool

- Tuesday, November 3rd, 2009 -

I just read that the website is now running Drupal. What a amazing piece of news for Drupal and open source development in general. Kudos!

Here’s some more details…

Posted in Uncategorized | No Comments »