Bind Lighttpd to multiple IPs/Domains

I have an internal development server that runs on multiple network interfaces and at times, has multiple DNS entries to the same site. Out of the box, Lighttpd does not support this, but its relatively simple to configure.

In your lighttpd.conf,

(In my example, I am changing the default server port to 8080.)

## bind to port (default: 80)
server.port = 8080
 
## bind to localhost (default: all interfaces)                                                                    
#server.bind                = "127.0.0.1"
$SERVER["socket"] == ":8080" {}

Leave a Reply

Your email address will not be published. Required fields are marked *