Lighttpd Configuration Independent of Hostname or IP

Hopefully someone can help with a bit of lighttpd configuration for
my production rails app in Mac OS X.

I have an application which will be accessed by many different
domains and IP addresses. Examples:
http://localhost/ (fake, but you get the idea, an external
Internet facing IP address)

My current config below only seems to work with “http://crm.local/
and I think it may be because of this line:
$HTTP[“host”] =~ “(www.)?crm.(local|” {
which to me would match “http://crm.local/”, “http://www.crm.local/”,” or “

Is there a way to configure lighttpd independently from the hostname
(like ignore it altogether, so if it gets a request on port 80 it
just sends it to my rails app)? I can see the advantages for virtual
domains or subdomains pointing to different apps, etc. But I’m
planning on just having this one server serve one rails app but will
be accessed through a few different IPs and hostnames.

I can’t seem to find any examples on the Net and the lighttpd doco is


PS, My current lighttpd.conf (the parts that matter):

server.document-root = “/Users/CRMServer/var/www/kc/public”
server.bind = “crm.local”
server.port = 80 = “/Users/CRMServer/var/www/kc/log/”
server.tag = “lighttpd_crm_doncaster”
server.username = “CRMServer”
server.groupname = “CRMServer”
accesslog.filename = “/Users/CRMServer/var/www/kc/log/
server.errorlog = “/Users/CRMServer/var/www/kc/log/
server.indexfiles = ( “index.php”, “index.html”,
“index.htm”, “default.htm” )
url.access-deny = ( “~”, “.inc” )

$HTTP[“host”] =~ “(www.)?crm.(local|” {
server.document-root = “/Users/CRMServer/var/www/kc/public/”
server.error-handler-404 = “/dispatch.fcgi”
fastcgi.server= (".fcgi" =>
(“” =>
“socket” => “/Users/CRMServer/var/www/kc/tmp/sockets/
“bin-path” => “/Users/CRMServer/var/www/kc/public/
“bin-environment” => (“RAILS_ENV” => “production” ),
“max-load-per-proc” => 4,
“min-procs” => 1,
“max-procs” => 2,
“idle-timeout” => 60

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs