No one was able to answer Adam Thorsen's question:

I would like to use dynamic subdomains in a rails app. Please provide the lighttpd configuration information required to make this work from inside of application.rb:

class ApplicationController < ActionController::Base
before_filter { |c| domain_tag = c.request.subdomains.first }
end

I have the following lighttpd.conf (that doesn't work but should):


server.port = 80server.bind = "0.0.0.0"server.pid-file = "/tmp/logligrary.pid"#server.event-handler = "freebsd-kqueue" server.modules = ( "mod_rewrite", "mod_redirect", "mod_access", "mod_fastcgi", "mod_cgi", "mod_accesslog", "mod_proxy")server.document-root = "/home/awt/prod-loglibrary/public/"server.indexfiles = ( "dispatch.fcgi", "index.html" )accesslog.filename = "/home/awt/prod-loglibrary/log/lighttpd_access.log"server.errorlog = "/home/awt/prod-loglibrary/log/lighttpd_error.log"server.error-handler-404 = "/dispatch.fcgi"$HTTP["host"] =~ "^(.+\.)?loglibrary\.com$" { # your config here proxy.balance = "fair" proxy.server = ( "/" => ( ( "host" => "127.0.0.1", "port" => 8001 ), ( "host" => "127.0.0.1", "port" => 8002 ), ( "host" => "127.0.0.1", "port" => 8003 ), ( "host" => "127.0.0.1", "port" => 8004 ) ) )}

People succeed in answering Adam Thorsen's questions 46% of the time (24 successes in 52 attempts).

Answers by: Rich Collins

Rich Collins's Answer:

Chat Conversation 900 days ago

hey adam Rich Collins at 5:29 AM on Sunday July 23rd, 2006