0

I am using Ubuntu 12.04 and installed Lighttpd using:

sudo apt-get install lighttpd

this installed version 1.4.28.

I downloaded the source files for 1.4.35 (latest) from the Lighttpd site and installed using:

cd /lighttpd-1.4.35/
./configure --without-bzip2
make
sudo make install

Checking version using lighttpd -v prints:

lighttpd/1.4.35 - a light and fast webserver
Build-Date: May 15 2014 09:35:28

However going to 127.0.0.1 in browser shows a list of /var/www together with a footer saying that it is still running version 1.4.28.

How can I upgrade Lighttpd correctly?

1 Answers1

0

automake projects use a default install location of /usr/local. The upstream lighttpd doesn't install any init scripts or similar (there are examples in the sources, but usually those are maintained by the distribution).

This means that the init script provided by your distribution starts the binary provided in /usr/sbin/lighttpd (from your 1.4.28 package), not the one in /usr/local/sbin/lighttpd (that you installed from sources).

So far the problem analysis.

NEVER MIX SOFTWARE FROM PACKAGES AND MANUALLY COMPILED SOURCES.

Just don't. If you have to compile from source, always try to compile and install it as a normal user, and not in /usr/local. For example you could run:

./configure --without-bzip2 --prefix=~/local
make install

This might make it more complicated to get it actually running, but keeps your system clean.

The preferred solution is always to install real packages (this also makes it easier to receive security updates), or building them yourself, then installing them (often by updating an already existing source package).

http://packages.ubuntu.com/search?keywords=lighttpd shows that 14.04 actually has lighttpd 1.4.33 (not 1.4.28). You could also try to install the debian jessie package (https://packages.debian.org/search?keywords=lighttpd) - if the dependencies can be satisfied it should work. (Or download the jessie package source and build it yourself).

As a last resort you could try packages from https://build.opensuse.org/package/show/home:stbuehler/lighttpd

Stefan
  • 819
  • 1
  • 7
  • 18