Warning: Creating default object from empty value in /homepages/39/d161420129/htdocs/p373.net/wp/wp-content/themes/p373b/admin/functions.php on line 183
Ec2, Elastic LoadBalancers, Passenger, forcing ssl and how not to drive yourself crazy

Ec2, Elastic LoadBalancers, Passenger, forcing ssl and how not to drive yourself crazy

Say you are using ec2, elastic load balancers and passenger to run your rails app, and then say you want to force ssl for all requests.  If you’re running a Rails 3.1+ app you just need to specify force_ssl, right?  nope.

Do these things and save yourself some time, money, and hair follicles:

  1. Change the loadbalancer health check to check https
  2. Don’t use passenger standalone!

We had been using passenger standalone with a reverse proxy in apache and it worked pretty well until I needed to implement a maintenance page and force ssl.  You could probably get it to work but you need to make sure to pass some headers around and thats beyond me.

I installed passenger properly on our CentOS box with a minimum of frustration, and even got it to work via rvm. Protip: make sure to run passenger-install-apache2-module as the user who normally runs rvm and when you do you’ll get a code snippet to put into your apache conf that is rvm specific. woohoo!

all is right with the world once again

 

    This entry was posted in Coding, Ruby/Rails, Technology. Bookmark the permalink. Both comments and trackbacks are currently closed.