I have multiple IP's and I would like to route each one to its own directory.

This is what I have so far..

$SERVER["socket"] == "XXX.XXX.XXX.XXX:81" {
  server.document-root = "/var/www/XXX.XXX.XXX.XXX "

While this works, It only works on port 81 and not the default 80.

When I change the port to 80, lighttpd fails to start up with the following error messege.

(network.c.300) can't bind to port: XXX.XXX.XXX.XXX 80 Address already in use

Please help!

  • do you have another web server on your machine? sounds like a some other service is using port 80 for something else. – Alistair Prestidge Jun 20 '10 at 13:16
  • netstat -an | grep 80 What do you see? – Nikolas Sakic Jun 20 '10 at 18:04

What I did was:

server.bind = ""


$SERVER["socket"] == "IP1:80" {

$SERVER["socket"] == "IP2:80" {

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy