Amr-
You have a few choices. You can either use lighttpd vhosts of sorts
with the config file I pasted below. Or since you have multiple IP’s
you can bind each app to its own IP and use a single lighty instance
for each app. If you do it with vhosts, you will have to restart all
your apps to restart one of your apps. If you do it with a separate
lighty on each IP for each app, you can restart them individually.
-Ezra
################
server.port = 80
server.errorlog = “/var/www-light/lighttpd.error.log”
accesslog.filename = “/var/www-light/lighttpd.access.log”
server.username = “www-data”
server.groupname = “www-data”
server.dir-listing = “disable”
Server.event-handler = “linux-rtsig”
default; this should never be used.
server.document-root = “/var/www-light/empty/”
server.indexfiles = (
“dispatch.fcgi”, “index.html”, “index.htm”
)
server.modules = (
“mod_access”,
“mod_status”,
“mod_rewrite”,
“mod_fastcgi”,
“mod_accesslog”
)
status.status-url = “/server-status”
url.access-deny = ( “~”, “.inc”, “#” )
$HTTP[“host”] =~ “myapp1.com” {
server.document-root = “/home/ez/apps/typo/public/”
server.error-handler-404 = “/dispatch.fcgi”
server.indexfiles = ( “dispatch.fcgi”)
server.errorlog = “/home/ez/logs/error.typo1.log”
fastcgi.server = ( “.fcgi” =>
( “localhost” =>
( “socket” => “/home/ez/tmp/typo1.socket”,
“min-procs” => 1,
“max-procs” => 5,
“bin-path” => “/home/ez/apps/typo/public/dispatch.fcgi”,
“bin-environment” => ( “RAILS_ENV” => “production” )
)))
}
$HTTP[“host”] =~ “myapp2.com” {
server.document-root = “/home/ez/apps/typo2/public/”
server.error-handler-404 = “/dispatch.fcgi”
server.indexfiles = ( “dispatch.fcgi”)
server.errorlog = “/home/ez/logs/error.typo2.log”
fastcgi.server = ( “.fcgi” =>
( “localhost” =>
( “socket” => “/home/ez/tmp/typo2.socket”,
“min-procs” => 1,
“max-procs” => 5,
“bin-path” => “/home/ez/apps/typo2/public/dispatch.fcgi”,
“bin-environment” => ( “RAILS_ENV” => “production” )
)))
}
$HTTP[“host”] =~ “myapp3.com” {
server.document-root = “/home/ez/apps/typo3/public/”
server.error-handler-404 = “/dispatch.fcgi”
server.indexfiles = ( “dispatch.fcgi”)
server.errorlog = “/home/ez/logs/error.typo3.log”
fastcgi.server = ( “.fcgi” =>
( “localhost” =>
( “socket” => “/home/ez/tmp/typo3.socket”,
“min-procs” => 1,
“max-procs” => 5,
“bin-path” => “/home/ez/apps/typo3/public/dispatch.fcgi”,
“bin-environment” => ( “RAILS_ENV” => “production” )
)))
}
################
mimetype.assign = (
“.rpm” => “application/x-rpm”,
“.pdf” => “application/pdf”,
“.sig” => “application/pgp-signature”,
“.spl” => “application/futuresplash”,
“.class” => “application/octet-stream”,
“.ps” => “application/postscript”,
“.torrent” => “application/x-bittorrent”,
“.dvi” => “application/x-dvi”,
“.gz” => “application/x-gzip”,
“.pac” => “application/x-ns-proxy-autoconfig”,
“.swf” => “application/x-shockwave-flash”,
“.tar.gz” => “application/x-tgz”,
“.tgz” => “application/x-tgz”,
“.tar” => “application/x-tar”,
“.zip” => “application/zip”,
“.mp3” => “audio/mpeg”,
“.m3u” => “audio/x-mpegurl”,
“.wma” => “audio/x-ms-wma”,
“.wax” => “audio/x-ms-wax”,
“.ogg” => “audio/x-wav”,
“.wav” => “audio/x-wav”,
“.gif” => “image/gif”,
“.jpg” => “image/jpeg”,
“.jpeg” => “image/jpeg”,
“.png” => “image/png”,
“.xbm” => “image/x-xbitmap”,
“.xpm” => “image/x-xpixmap”,
“.xwd” => “image/x-xwindowdump”,
“.css” => “text/css”,
“.html” => “text/html”,
“.htm” => “text/html”,
“.js” => “text/javascript”,
“.asc” => “text/plain”,
“.c” => “text/plain”,
“.conf” => “text/plain”,
“.text” => “text/plain”,
“.txt” => “text/plain”,
“.dtd” => “text/xml”,
“.xml” => “text/xml”,
“.mpeg” => “video/mpeg”,
“.mpg” => “video/mpeg”,
“.mov” => “video/quicktime”,
“.qt” => “video/quicktime”,
“.avi” => “video/x-msvideo”,
“.asf” => “video/x-ms-asf”,
“.asx” => “video/x-ms-asf”,
“.wmv” => “video/x-ms-wmv”,
“.bz2” => “application/x-bzip”,
“.tbz” => “application/x-bzip-compressed-tar”,
“.tar.bz2” => “application/x-bzip-compressed-tar”
)
On Feb 2, 2006, at 3:38 PM, Amr M. wrote:
etc. etc.
different domain names (resolving to the same dedicated box) off of
simply.
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails
-Ezra Z.
Yakima Herald-Republic
WebMaster
509-577-7732
[email protected]