Feb 10, 2010

Quick Tip: Compiile nginx/passenger with SSL

I recently installed Ruby Enterprise Edition on one of my stacks. While you need to rerun the apache install module there's no word on whether that's necessary if you use Nginx. I thought it better to just recompile rather than just risk it. Problem is that if you need SSL with Nginx the default Phusion installer won't help you unless you choose the advanced route.


Assuming you used the Ubuntu package for Ruby Enterprise Edition:

Step 1: Download nginx, untar it and put it into /tmp/

wget http://nginx.org/download/nginx-0.7.65.tar.gz
sudo mv nginx-0.7.65.tar.gz /tmp
cd /tmp
tar xvzf nginx-0.7.65.tar.gz


Step 2: Run the phusion installer for nginx:
sudo /usr/local/bin/passenger-install-nginx-module


Step 3: When it asks you, choose the advanced option [2]

For the location of nginx, enter the path from Step 1.

--> Where is your Nginx source code located?

/tmp/nginx-0.7.65


Step 4: When it asks you for extra arguments, enter this one for SSL
--> Extra arguments to pass to configure script

--with-http_ssl_module


And then it should happily go about compiling nginx with SSL support. From there it's just a matter of following the instructions the installer gives you!

No comments:

Post a Comment