tag:bettong.net,:/tag/webserver Urban Hafner : Tag webserver, everything about webserver 2007-08-27T08:02:50+00:00 Typo tag:bettong.net,:Article/492 2007-06-06T15:38:07+00:00 2007-08-27T08:02:50+00:00 Urban Hafner Lighttpd gotchas

I just tried to setup lighttpd (1.4.13) to run several sites side by side and run one of them on a different port. The following things should be noted:

server.prot

You can’t just set server.port. It’s a global variable a overwrites the previous ones.

$SERVER[“socket”] and $HTTP[“host”]

Using $SERVER["socket"] and $HTTP["host"] together doesn’t work. I tried to do the following:

$SERVER["socket"] == "0.0.0.0:5005" {
  $HTTP["host"] == "example.com" {
    server.errorlog    = "/error.log"
    accesslog.filename = "/access.log"
    proxy.balance = "fair"
    proxy.server = ( "/" =>
                     (("host" => "127.0.0.1", "port" => 5001))
                   )
  }
}

But that doesn’t work! I ended up removing the $HTTP["host"] part. Which is not that nice as you can now access the site on port 5005 using all the other URLs defined in the config file!

Are there any solutions to this problem?

I just tried to setup lighttpd (1.4.13) to run several sites side by side and run one of them on a different port. The following things should be noted:

server.prot

You can’t just set server.port. It’s a global variable a overwrites the previous ones.

$SERVER[“socket”] and $HTTP[“host”]

Using $SERVER["socket"] and $HTTP["host"] together doesn’t work. I tried to do the following:

$SERVER["socket"] == "0.0.0.0:5005" {
  $HTTP["host"] == "example.com" {
    server.errorlog    = "/error.log"
    accesslog.filename = "/access.log"
    proxy.balance = "fair"
    proxy.server = ( "/" =>
                     (("host" => "127.0.0.1", "port" => 5001))
                   )
  }
}

But that doesn’t work! I ended up removing the $HTTP["host"] part. Which is not that nice as you can now access the site on port 5005 using all the other URLs defined in the config file!

Are there any solutions to this problem?