Project

General

Profile

Actions

Feature #11

closed

Allow variables to be defined and used in config files

Added by Anonymous about 19 years ago. Updated almost 17 years ago.

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

Description

We could replace this:


$HTTP["host"] =~ "\.basecamp\.i$" {
  ssl.pemfile          = "/Users/david/Code/Ruby/37signals/basecamp/trunk/certs/secure_basecamphq_com.pem" 
  server.document-root = "/Users/david/Code/Ruby/37signals/basecamp/trunk/public" 
  server.errorlog      = "/Users/david/Code/Ruby/37signals/basecamp/trunk/log/lighttpd.error.log" 
  accesslog.filename   = "/Users/david/Code/Ruby/37signals/basecamp/trunk/log/lighttpd.access.log" 

  fastcgi.server = ( ".fcgi" =>
    ( "localhost" =>
        (
          "min-procs" => 1, 
          "max-procs" => 1,
          "socket"   => "/tmp/basecamp.fcgi.socket",
          "bin-path" => "/Users/david/Code/Ruby/37signals/basecamp/trunk/public/dispatch.fcgi" 
        )
    )
  )
}

$HTTP["host"] =~ "\.clientsection\.com$" {
  ssl.pemfile          = "/var/www/stage/basecamp/trunk/certs/secure_basecamphq_com.pem" 
  server.document-root = "/var/www/stage/basecamp/trunk/public" 
  server.errorlog      = "/var/www/stage/basecamp/trunk/log/lighttpd.error.log" 
  accesslog.filename   = "/var/www/stage/basecamp/trunk/log/lighttpd.access.log" 

  fastcgi.server = ( ".fcgi" =>
    ( "localhost" =>
        (
          "min-procs" => 1, 
          "max-procs" => 1,
          "socket"   => "/tmp/basecamp.fcgi.socket",
          "bin-path" => "/var/www/stage/basecamp/trunk/public/dispatch.fcgi" 
        )
    )
  )
}

With this:


$HTTP["host"] =~ "\.basecamp\.i$"        { $base_path = "/Users/david/Code/Ruby/37signals" }
$HTTP["host"] =~ "\.clientsection\.com$" { $base_path = "/var/www/stage" }

ssl.pemfile          = $base_path + "/basecamp/trunk/certs/secure_basecamphq_com.pem" 
server.document-root = $base_path + "/37signals/basecamp/trunk/public" 
server.errorlog      = $base_path + "/37signals/basecamp/trunk/log/lighttpd.error.log" 
accesslog.filename   = $base_path + "/37signals/basecamp/trunk/log/lighttpd.access.log" 

fastcgi.server = ( ".fcgi" =>
  ( "localhost" =>
      (
        "min-procs" => 1, 
        "max-procs" => 1,
        "socket"   => "/tmp/basecamp.fcgi.socket",
        "bin-path" => $base_path + "/basecamp/trunk/public/dispatch.fcgi" 
      )
  )
)

-- david

Actions #1

Updated by jan about 19 years ago

  • Status changed from New to Assigned
Actions #2

Updated by Anonymous about 19 years ago

"include + constant-variable" is better, expand at parse time

-- Xuefer <xuefer

Actions #3

Updated by jan almost 19 years ago

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

added by Xuefer in changeset r307

Actions

Also available in: Atom