Here''s the scenario I have a production box I would like to continue running with Apache at the moment. I have ProxyPass working well for a subdomain I have set up for my rails apps. So basically, http://foo.mydomain.com -> http://mydomain.com:8080 8080 is where lighttpd is listening, however how can I set up multiple rails apps on this subdomain? I can''t seem to figure out how to get lighttpd to switch dispatch.fcgi because they''re all on the same $HTTP["host"]. Using $HTTP["url"] doesn''t work it seems because it is parsed after document-root and fcgi is set. I guess I could add a new subdomain for each app, but I feel like there must be a better solution. Any ideas are appreciated.
* Paul [2005-03-23 00:24]:> Here''s the scenario I have a production box I would like to continue > running with Apache at the moment. I have ProxyPass working well for a > subdomain I have set up for my rails apps. > > So basically, http://foo.mydomain.com -> http://mydomain.com:8080 > > 8080 is where lighttpd is listening, however how can I set up multiple > rails apps on this subdomain? I can''t seem to figure out how to get > lighttpd to switch dispatch.fcgi because they''re all on the same > $HTTP["host"]. Using $HTTP["url"] doesn''t work it seems because it is > parsed after document-root and fcgi is set. > > I guess I could add a new subdomain for each app, but I feel like > there must be a better solution. > > Any ideas are appreciated.Maybe I''m missing something here, but can''t you just have a path in the URL you''re proxying "to"? # httpd.conf for your vhost ProxyPass /app1/ http://localhost:8080/app1/ ProxyPass /app2/ http://localhost:8080/app2/ something like that maybe? -- ______________________________ toddgrimason*todd-AT-slack.net
The problem seems to be that, unless I misunderstood, each seperate dispatch.fcgi has to be selected by lighttpd. By using the conditional $HTTP["host"] I could do that, however when proxy''ing those two apps there is not difference in the "host" they both share the same domain and subdomain. And using $HTTP["url"] doesn''t seem to catch the differences, so I figured it too late in the order of running to seperate out a serparate dispatch.fcgi. I''ll give it another go though, thanks for the reply. -Paul On Wed, 23 Mar 2005 17:53:18 -0500, Todd Grimason <todd-cwT7Wi5Y1r1eoWH0uzbU5w@public.gmane.org> wrote:> * Paul [2005-03-23 00:24]: > > Here''s the scenario I have a production box I would like to continue > > running with Apache at the moment. I have ProxyPass working well for a > > subdomain I have set up for my rails apps. > > > > So basically, http://foo.mydomain.com -> http://mydomain.com:8080 > > > > 8080 is where lighttpd is listening, however how can I set up multiple > > rails apps on this subdomain? I can''t seem to figure out how to get > > lighttpd to switch dispatch.fcgi because they''re all on the same > > $HTTP["host"]. Using $HTTP["url"] doesn''t work it seems because it is > > parsed after document-root and fcgi is set. > > > > I guess I could add a new subdomain for each app, but I feel like > > there must be a better solution. > > > > Any ideas are appreciated. > > Maybe I''m missing something here, but can''t you just have a path in the > URL you''re proxying "to"? > > # httpd.conf for your vhost > ProxyPass /app1/ http://localhost:8080/app1/ > ProxyPass /app2/ http://localhost:8080/app2/ > > something like that maybe? > > -- > > ______________________________ > toddgrimason*todd-AT-slack.net > >
* Paul [2005-03-23 21:12]:> The problem seems to be that, unless I misunderstood, each seperate > dispatch.fcgi has to be selected by lighttpd. > > By using the conditional $HTTP["host"] I could do that, however when > proxy''ing those two apps there is not difference in the "host" they > both share the same domain and subdomain. > > And using $HTTP["url"] doesn''t seem to catch the differences, so I > figured it too late in the order of running to seperate out a > serparate dispatch.fcgi.Ah I see what you mean. I''ve only just started looking at lighttpd, but I''d suggest you wander over the the mailing list there, they''re generally helpful and the developer is active and friendly. -- ______________________________ toddgrimason*todd-AT-slack.net