Upgrading Lighttpd - trials and tribulations + documentation = a happy future

So I had a feeling lighttpd would be getting a new version and of course I didn't document my install process originally. I compiled it from source and of course did a lot of custom hacks to get it working the way I wanted it to be, but when it came down to documenting it - well...nuff said.

So I decided to upgrade today and just to potentially make life easier for others and myself I thought I would list some of the problems I ran into and what I did to work around them.

So I had to do an export path to get lua to be enabled.

I already had lua installed before, but lighttpd's compiler wasn't finding it, so a little googling and I found these commands which did the trick.

pkg-config --cflags lua5.1
export LUA_CFLAGS=-I/usr/include/lua5.1
pkg-config --libs lua5.1
export LUA_LIBS=-llua5.1

So what I ended up compiling was this.

./configure --with-mysql --with-openssl --with-mod_mysql_vhost --with-mod_magnet --with-lua

Now --with-mod_magnet and --with_mod_mysql_vhost probably weren't needed what was necessary was to enable --with-lua and --with-mysql

So this compiled but I was running into a problem were fastcgi was crashing. I thought this had something to do with my upgrade path and I wasn't sure, until I ran php5-cgi from the command line and found out eaccelerator was crashing because debian had upgraded php on me and I hadn't recompiled it.

I just followed the instructions in the readme for eaccelarator and woalah a restart of lighttpd and it was working.

Now lighttpd-ssl kept crashing with a wrong plug-in version, finally I did a locate of the binary and found out, I had created a copy of lighttpd as lighttpd-ssl in order to run 2 different processes and lighttpd-ssl was still the old version I originally created, so mv the old file and cp the new file and lets see if it works. Woahlah. Everything is happy and go-lucky and squirrelmail still has cookie dropping problems just as before, but the websites are up and running and I don't have to worry about security fixes and I can upgrade lighttpd in the future with less stress.