Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

What I did was:

server.bind = ""


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

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

Your Answer


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