Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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!

share|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
add comment

1 Answer

What I did was:

server.bind = "127.0.0.1"

then

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

$SERVER["socket"] == "IP2:80" {
}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.