nginx SSL PEM_read_bio:bad end line

Installing the intermediate certificates on our server gave me the following error while trying to start up nginx again:

The end of the file looked fine, but the problem was half way through it. Somehow the concatenation had joined two lines together:

This just needed a line break to fix:

Paperclip S3 expiring_url with styles and SSL

A current requirement is that assets uploaded to Amazon S3 must be accessed via SSL and use an expiring URL. Using an expiring url with Paperclip is extremely easy.

The problem is expiring_url doesn’t let you choose a style and doesn’t use https, which breaks our SSL site. To add the behaviour was an easy “hack”. I added the file /config/initializers/paperclip.rb with the following code:

Now calling my expiring image URL with a style and over https is just:

Ubuntu: Curl development headers with SSL support

Just been trying to install Passenger on a new Ubuntu EC2 instance and passenger is giving me the error:

Took some digging around but turns out I was just missing the libcurl4-openssl-dev package: