Showing posts with label nginx. Show all posts
Showing posts with label nginx. Show all posts

Friday, January 15, 2010

Install Nginx from source on Debian

I thought it was time to write a followup post to, Install Memcached from source on Debian Lenny.

At this moment, Debian provides Nginx 0.6.39 and I was wanting to run Nginx 0.7. The latest stable version is 0.7.64, so I thought I would put together a script to automate the download and installation for me.

Some devoted Debian users will want to string me up for installing a source package, and some others will no doubt say that I'm hating Debian for not using aptitude. These people are entitled to their opinion of course, but I don't feel that there is anything wrong with installing a source package on Debian.

If you feel like installing a package from source makes Debian cry, leave now :)


Thursday, December 10, 2009

Fix POST for Ruby 1.9.1 and Passenger

How exciting! A new Ruby release to play with.

I figured it was time to migrate this particular app to 1.9.1 on the integration server. We've been developing this app with 1.9 and all looks good.

So I...

  • Upgraded Nginx to version 0.7.64
  • Installed Ruby 1.9.1-p376
  • Installed Passenger 2.2.7
  • Configured Nginx to use the new versions of Ruby and Passenger
  • ... and restarted Nginx

I hit the home page of the app.... Sweet, it works! Yay!

At this point I did a minor happy dance. Nothing over the top, you know... just a little wiggle :)

Then I tried to login to the app... "500 Internal Server Error"

Oh. :(

I stopped dancing right there.

It turns out that POST requests fail for Ruby 1.9.1 and Passenger.

Fortunately, there is a patch.

Patching tempfile.rb did the trick. On that particular machine, tempfile.rb was located at /usr/local/lib/ruby19/1.9.1/tempfile.rb

Thanks to Ryan Bigg for confirming the fix is good.