Custom CSS

Monday, August 13, 2007

Resin 3.0 and HTTPS

How to configure Resin to use SSL: SSL with Resin. The directions on the site are accurate, but the directories for openssl were a little confusing for me in Ubuntu Feisty Fawn. Here are configure arguments to get things rolling:

./configure --enable-ssl --enable-jni \
  --with-openssl-lib=/usr/lib \
  --with-openssl-include=/usr/include \
  --with-openssl=/usr/lib/ssl \
  --with-jni-include="-I${java.home}/include -I${java.home}/include/linux" \

There is a bug in Resin 3.1.2 that fails to load the library unless the compiler flag is set. Also, you must make with:

make "PROXY_LIBS=-lpthread -lc";

Where ${java.home} is the installation directory for your JDK. Do a locate jni_md.h to find out what the right include directory is; SSL with Resin won't work unless JNI is also enabled.