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!

link|improve this question
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
feedback

1 Answer

What I did was:

server.bind = "127.0.0.1"

then

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

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

link|improve this answer
feedback

Your Answer

 
or
required, but never shown