Project

General

Profile

Feature #11

Allow variables to be defined and used in config files

Added by Anonymous almost 15 years ago. Updated over 12 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
core
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:

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

#1

Updated by jan almost 15 years ago

  • Status changed from New to Assigned
#2

Updated by Anonymous almost 15 years ago

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

-- Xuefer <xuefer

#3

Updated by jan almost 15 years ago

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

added by Xuefer in changeset r307

Also available in: Atom