Greetings,
I’ve set up apache as a proxy for my lightTPD server as describe in JDD
essay: http://duncandavidson.com/essay/2006/01/railsonapache
Everything works great except if I try to access my site like this:
http://softdist6.berkeley.edu
Then my webrowser tries to download the dispatch.fcgi from the webdir of
my app. I have no idea why this is happening. If I do
softdist6.berkeley.edu/all or any sub directory of
softdist6.berkeley.edu
then everything works fine.
My lighthttpd.conf and vhost.conf files are below. Anyone have any
ideas?
[lightTPD]
server.document-root = “/srv/www/ror-apps/software_central/public”
server.modules = (“mod_rewrite”, “mod_accesslog”, “mod_fastcgi”)
server.port = 81
server.username = “wwwrun”
server.groupname = “www”
server.pid-file = CWD + “/tmp/lighttpd.pid”
accesslog.filename = CWD + “/log/access_log”
server.errorlog = CWD + “/log/error_log”
server.indexfiles = ( “index.html” )
mimetype.assign = (
“.css” => “text/css”,
“.gif” => “image/gif”,
“.html” => “text/html”,
“.jpeg” => “image/jpeg”,
“.jpg” => “image/jpeg”,
“.js” => “text/javascript”,
“.pdf” => “application/pdf”,
“.png” => “image/png”,
“.txt” => “text/plain”,
)
var.appname = “/srv/www/ror-apps/software_central”
$HTTP[“host”] == “softdist6.berkeley.edu” {
server.document-root = CWD + “/public”
url.rewrite = ( “^/$” => “index.html”, “^([^.]+)$” => “$1.html” )
server.error-handler-404 = “/dispatch.fcgi”
fastcgi.server = ( “.fcgi” =>
( “localhost” =>
( “min-procs” => 5,
“max-procs” => 5,
“socket” => CWD + “/tmp/sockets/fcgi.socket”,
“bin-path” => CWD + “/public/dispatch.fcgi”,
“bin-environment” => ( “RAILS_ENV” => “development” )
)
)
)
}
[/lightTPD]
[apache]
<VirtualHost *:80>
ServerName softdist6.berkeley.edu
DocumentRoot /srv/www/htdocs/softdist6
ProxyPass /wsspurch !
ProxyPass /i http://softdist6.berkeley.edu:81/
ProxyPassReverse / http://softdist6.berkeley.edu:81
ProxyPreserveHost on
[/apache]