Project

General

Profile

Actions

Bug #1661

closed

Old lighttpd.conf no longer works (remoteip condition fails)

Added by Anonymous over 16 years ago. Updated about 16 years ago.

Status:
Fixed
Priority:
Low
Category:
core
Target version:
ASK QUESTIONS IN Forums:

Description

Here's a chunk of my old config file:


# Local "admin/dev" connections
$HTTP["remoteip"] == "127.0.0.1" {
  connection.kbytes-per-second    = 0
  server.kbytes-per-second        = 0
  # snip other options specific to "hidden" virtual domains

  # admin host (127.0.0.1)
  $HTTP["host"] == "admin.domain:443" {
    server.document-root        = var.basedir + "/admin/htdocs" 
    server.errorfile-prefix     = var.basedir + "/admin/error/" 
  }

  # snip more hosts
}

This no longer works, as of lighttpd 1.4.19 (and possibly other versions, haven't checked on these domains in a while; but it used to work just fine). However, the logs show that the connection is being made from 127.0.0.1 to 127.0.0.1 (along with a few other tools, netstats, etc...). The default, or global, website is being served up, instead of the "hidden/private" virtual domains. When the config file is changed it works fine:


# admin host (127.0.0.1)
$HTTP["host"] == "admin.domain:443" {
  $HTTP["remoteip"] == "127.0.0.1" {
    connection.kbytes-per-second    = 0
    server.kbytes-per-second        = 0
    # snip other config options specific to 127.0.0.1 connections

    server.document-root        = var.basedir + "/admin/htdocs" 
    server.errorfile-prefix     = var.basedir + "/admin/error/" 
  }
}

# snip other hosts

You have probably noticed that this adds X*Y lines, where X is equal to the number of config options specific to 127.0.0.1 connections, and Y is equal to the number of virtual hosts minus one. In my case this is about 5*(6-1)=25 duplicate lines. Ned Flanders Quote ugly config file, and this behaviour isn't even mentioned in the docs. I'd recommend making it clear that $HTTP [ 'host' ] conditions don't work inside the scope of a $HTTP [ 'remoteip' ] condition in the docs, until someone can find out why this doesn't work, and fix it :)

It may be possible that this behaviour is limited to my machine, so I won't edit the wiki docs until someone else can confirm this behaviour.

-- deadram

Actions #1

Updated by stbuehler over 16 years ago

Please try current svn, or apply the changes of r2147

Actions #2

Updated by stbuehler over 16 years ago

  • Status changed from New to Fixed
  • Resolution set to fixed

Missing feedback, assuming it got fixed in r2147.

Actions

Also available in: Atom