About 17:00 localtime I managed to get fastcgi, Rails and IIS all happy together. Upon success I ripped off my clothes and ran through the village yelling "The future is now!". A PDP-11 geezer stuck his head out a window and said "The future isn''t what it used to be and keep yer shirt on". Modifications were required to dispatch.fcgi and request.rb. The following components were used: Ionic Shade ISAPI ReWriter: http://cheeso.members.winisp.net/dl/IonicIsapiRewriter.zip Shane Caraveo''s FastCGI ISAPI DLL: http://www.caraveo.com/fastcgi/fastcgi-0.6.zip fcgi.rb and fcgi.so from Ruby for Apache: http://rubyforge.org/frs/download.php/2198/RubyForApache-beta2.exe It appears to be stable. I haven''t had a chance to stress test it yet but so far I have not seen anything odd like rubyw processes multiplying without limit. It took an all-nighter and more than once my stack of ASP.Net books started looky mighty attractive. xev
Demetrius Nunes
2005-May-23 01:32 UTC
Re: Success - Rails, FastCGI, and IIS / Windows Server
Xevious wrote:> > About 17:00 localtime I managed to get fastcgi, > Rails and IIS all happy together.Good news Xevious. Can you write a quick guide on how you managed to set this up in a Rails wiki page? Thanks a bunch. rgds Dema http://dema.ruby.com.br/
Michael Campbell
2005-May-23 01:55 UTC
Re: Re: Success - Rails, FastCGI, and IIS / Windows Server
On 5/22/05, Demetrius Nunes <demetrius-fDpYTK8McCzCdMRJFJuMdgh0onu2mTI+@public.gmane.org> wrote:> Xevious wrote: > > > > About 17:00 localtime I managed to get fastcgi, > > Rails and IIS all happy together. > > Good news Xevious. Can you write a quick guide on how you managed to set > this up in a Rails wiki page? Thanks a bunch.Boy If this doesn''t sound like another "Fermat''s Last Theorem" in the making...
That''s fantastic!!!!! Would you care to document you adventure? So, others mighht be able to navigate that minefield with relative safety. Are you on Windows 2003? -Larry Xevious wrote:> > About 17:00 localtime I managed to get fastcgi, > Rails and IIS all happy together. > > Upon success I ripped off my clothes and ran through > the village yelling "The future is now!". A PDP-11 > geezer stuck his head out a window and said "The future > isn''t what it used to be and keep yer shirt on". > > Modifications were required to dispatch.fcgi and request.rb. > > The following components were used: > > Ionic Shade ISAPI ReWriter: > http://cheeso.members.winisp.net/dl/IonicIsapiRewriter.zip > > Shane Caraveo''s FastCGI ISAPI DLL: > http://www.caraveo.com/fastcgi/fastcgi-0.6.zip > > fcgi.rb and fcgi.so from Ruby for Apache: > http://rubyforge.org/frs/download.php/2198/RubyForApache-beta2.exe > > It appears to be stable. I haven''t had a chance to stress > test it yet but so far I have not seen anything odd like > rubyw processes multiplying without limit. > > It took an all-nighter and more than once my stack of ASP.Net > books started looky mighty attractive. > > xev > > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > >
s002 wrote:> Would you care to document you adventure?Adventure... Hmmm, yeah, I laughed a little, I cried a little. I will be writing up a how-to shortly.> Are you on Windows 2003?This dev server was 2000, but I will be installing it on a 2003 server this week or next. xev
Soulhuntre
2005-May-23 06:45 UTC
RE: Re: Success - Rails, FastCGI, and IIS / Windows Server
Heya :)> -----Original Message----- > From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails- > bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Demetrius Nunes > Sent: Sunday, May 22, 2005 9:33 PM > To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: [Rails] Re: Success - Rails, FastCGI, and IIS / Windows Server > > Xevious wrote: > > > > About 17:00 localtime I managed to get fastcgi, > > Rails and IIS all happy together. > > Good news Xevious. Can you write a quick guide on how you managed to set > this up in a Rails wiki page? Thanks a bunch.That''s it, everyone gets a free pony! :) Good work, I hope it turns out to be stable! Soulhuntre ---------- http://www.girl2.com - my girls http://www.the-estate.com - my legacy http://wiki.thegreybook.com - my project http://weblog.soulhuntre.com - my thoughts
Paul Nicholls
2005-May-23 10:39 UTC
Re: Success - Rails, FastCGI, and IIS / Windows Server
> Modifications were required to dispatch.fcgi and request.rb. > > The following components were used: > > Ionic Shade ISAPI ReWriter: > http://cheeso.members.winisp.net/dl/IonicIsapiRewriter.zip > > Shane Caraveo''s FastCGI ISAPI DLL: > http://www.caraveo.com/fastcgi/fastcgi-0.6.zip > > fcgi.rb and fcgi.so from Ruby for Apache: > http://rubyforge.org/frs/download.php/2198/RubyForApache-beta2.exe >Hehe, that configuration sounds pretty familiar ;) Did you manage to find the solution to hardcoding FastCGI apps? That was the only part that stumped me. You modified dispatch.fcgi? I''m not convinced Ionic Shade ISAPI ReWriter was a great choice of mine, as it then requires a hacking of the querystring in request.rb. I''ve seen other rewriters add/edit the HTTP_X_REWRITE_URL env variable which is closer to how REQUEST_URI works, and I think that would be a better path to go down. Sadly I don''t have much free time to chase this up any more, so I''m glad someone else is keeping the flame :)
Paul Nicholls wrote:> Hehe, that configuration sounds pretty familiar ;)Yes, I used your page as a pointer to the files.> Did you manage to find the solution to hardcoding FastCGI apps?No, but my servers will be dedicated to a single app, so I didn''t try. It shouldn''t be too big of a trick to call a bogus dispatch.fcgi that then hands off to the real app''s dispatch based on subdomain, etc.> You modified dispatch.fcgi?That latest dispatch.fcgi is broken under Windows.> I''m not convinced Ionic Shade ISAPI ReWriter was a great choice of > mine, as it then requires a hacking of the querystring in request.rb. > I''ve seen other rewriters add/edit the HTTP_X_REWRITE_URL env variable > which is closer to how REQUEST_URI works, and I think that would be a > better path to go down.The latest request.rb has changes purported to handle IIS. They are broken but it only requires a small change to get it working. As soon as I have time to figure out why the current unit tests are broken, I will create a patch. xev
So for some weird reson I''ve got all of this working too! Well, almost. And I''m on IIS6 (windows 2003 web edition) As a testapp I''m using ''Typo'' as I have gotten this working on lighttpd and apache, and I''m sure I''m not screwing up any thing in the area of Rails/Ruby. Anyway, my setup consisted of: - Installing the rubyforapache.exe - Using ISAPI_Rewrite (from http://www.helicontech.com/ - I''m using the commercial version of $ 45, as I was sure that would work on IIS6) - The below mentioned fastcgi-0.6.zip Basically I followed Paul Nicholls instructions on setting up the fastcgi isapi_plugin, had a few very scary moments with having ''lost'' my entire iis setup (could not reconnect to admin), rebooted, and found everything working (I know, weird). I have used the following rewrite rule in the httpd.ini: [ISAPI_Rewrite] RepeatLimit 0 RewriteRule ^(/[^.]+)$ /dispatch.fcgi?$1 [L] Now I''m not sure why / if I should alter the request.rb or cgi_process.rb. Right now all seems to work very nice exept for the default page. http://localhost/ gives me a Directory Listing Denied page, http://localhost/dispatcher.fcgi/ works. Could this be my rewrite rule, or would this typically be the reason why I should alter formentioned files? Finally, I''m a bit worried about the hardcoded path to the dispatcher.fcgi file in the registry. This would mean there''s a limit of one rails initiative per server? Hope this helps anyone / anyone can help me. If I get a bit more of a ''solid'' idea on the whole setup (I feel luck for both getting stuff working, and getting stuff working after a reboot) I''ll sure to post an update. Regards, Boris Oh, and I also set up an Apache 2.0 with fcgi on this box and and performance seemed much slower than the current IIS6.0 setup, so hurray for IIS ;-). No decent stress / load tests obviously. -----Original Message----- From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Xevious Sent: maandag 23 mei 2005 2:14 To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: [Rails] Success - Rails, FastCGI, and IIS / Windows Server About 17:00 localtime I managed to get fastcgi, Rails and IIS all happy together. Upon success I ripped off my clothes and ran through the village yelling "The future is now!". A PDP-11 geezer stuck his head out a window and said "The future isn''t what it used to be and keep yer shirt on". Modifications were required to dispatch.fcgi and request.rb. The following components were used: Ionic Shade ISAPI ReWriter: http://cheeso.members.winisp.net/dl/IonicIsapiRewriter.zip Shane Caraveo''s FastCGI ISAPI DLL: http://www.caraveo.com/fastcgi/fastcgi-0.6.zip fcgi.rb and fcgi.so from Ruby for Apache: http://rubyforge.org/frs/download.php/2198/RubyForApache-beta2.exe It appears to be stable. I haven''t had a chance to stress test it yet but so far I have not seen anything odd like rubyw processes multiplying without limit. It took an all-nighter and more than once my stack of ASP.Net books started looky mighty attractive. xev _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
boris wrote:> Now I''m not sure why / if I should alter the request.rb or cgi_process.rb.The problem with moving target code bases is that how-to docs go out of date quickly. cgi_process.rb does not need modified, but request.rb does. (using the latest versions)> Right now all seems to work very nice exept for the default page.Default as in index.html? You have to spec it as an index page in your IIS config. (otherwise it expects lame names like Default.htm)> Finally, I''m a bit worried about the hardcoded path to the dispatcher.fcgi > file in the registry. This would mean there''s a limit of one rails > initiative per server?I think this can be overcome with an easy kludge. xev
> boris wrote: > > Now I''m not sure why / if I should alter the request.rb orcgi_process.rb.> The problem with moving target code bases is that how-to docs go out ofdate quickly. cgi_process.rb does not need modified, but request.rb does. (using the latest versions) I now have changed the request.rb, hopefully this will do the trick. Could we roll this change into the codebase (checking which webserver we are using for example)> Right now all seems to work very nice exept for the default page.> Default as in index.html? You have to spec it as an index page in your IISconfig. (otherwise it expects lame names like Default.htm) That''s already configured, but my default page (/) should be handled by Rails too. Must be an issue with the regular expression I guess.> > Finally, I''m a bit worried about the hardcoded path to the > > dispatcher.fcgi file in the registry. This would mean there''s a limit > > of one rails initiative per server?> I think this can be overcome with an easy kludge.If you have a suggestion. Did you test it without the Args path? I guess that will be my first next step ;-) xev _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Michel Rasschaert
2005-May-24 10:10 UTC
Re: Success - Rails, FastCGI, and IIS / Windows Server
Hi, 2005/5/23, boris <boris-OWJDjcdC7C/2dWTfsa9fiw@public.gmane.org>:> Basically I followed Paul Nicholls instructions on setting up the fastcgi > isapi_plugin, had a few very scary moments with having ''lost'' my entire iis > setup (could not reconnect to admin), rebooted, and found everything working > (I know, weird). I have used the following rewrite rule in the httpd.ini: > [ISAPI_Rewrite] > RepeatLimit 0 > RewriteRule ^(/[^.]+)$ /dispatch.fcgi?$1 [L]Maybe try RewriteRule ^(/[^.]*)$ /dispatch.fcgi?$1 [L] i think / will not match the regex with + Bye Michel
Michel Rasschaert wrote:> 2005/5/23, boris <boris-OWJDjcdC7C/2dWTfsa9fiw@public.gmane.org>: >>[ISAPI_Rewrite] >>RepeatLimit 0 >>RewriteRule ^(/[^.]+)$ /dispatch.fcgi?$1 [L] > > > Maybe try > > RewriteRule ^(/[^.]*)$ /dispatch.fcgi?$1 [L] > > i think / will not match the regex with +In my last email on the subject I forgot to include: My IsapiRewrite4.ini contains: IterationLimit 0 RewriteRule ^(.*)$ /dispatch.fcgi?$1 The changes to request.rb were: (mind the line wrap) ##################################################### else # REQUEST_URI is blank under IIS - get this from PATH_INFO and SCRIPT_NAME script_filename = env["SCRIPT_NAME"].to_s.match(%r{[^/]+$}) #request_uri = env["PATH_INFO"] #request_uri.sub!(/#{script_filename}\?\//, '''') unless script_filename.nil? #request_uri += ''?'' + env["QUERY_STRING"] unless env["QUERY_STRING"].nil? || env["QUERY_STRING"].empty? request_uri = env["QUERY_STRING"] return request_uri ##################################################### xev
RewriteRule ^(.*)$ /dispatch.fcgi?$1 works for me, now http://localhost/ gets handled perfectly I''ve tried your suggestion for changing the request.rb and this does not work in my setup. Actually I did not need to change a single thing on the ruby rails part after installing the RubyForApache-beta2.exe. After I changed the request.rb only my default controller path worked (my ''homepage''), no other url would make a difference. I think it is specific to Windows2000/WindowsXP vs. Windows 2003. Coming to think of it, I''m pretty sure it is IIS/Windows version specific. I once had a similar problem with PHP (Wordpress on IIS) and found out there were similar differences. I can''t find my notes on the wordpress support site unfortunately for the details, but for now I''m convinced that on a 2003 box you should not change request.rb. So I also did a basic performance test on my laptop and it seems its holding okay. I configured the Microsoft Application Center Test (weird name) to mimic 5 browsers requesting the homepage (basic Typo homepage with a random image served by Ruby/Rails). It averaged 17,09 request per second, which is faster than most java apps would do, so I''m happy for now. I ran it for 5 minutes, and the first minute the average is something like 11 request per second. It seems getting these rubyw.exe''s up to speed takes a lot of time and cpu power. Memory was really good, cpu through the roof though. /Boris -----Original Message----- From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Xevious Sent: dinsdag 24 mei 2005 16:29 To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails] Success - Rails, FastCGI, and IIS / Windows Server Michel Rasschaert wrote:> 2005/5/23, boris <boris-OWJDjcdC7C/2dWTfsa9fiw@public.gmane.org>: >>[ISAPI_Rewrite] >>RepeatLimit 0 >>RewriteRule ^(/[^.]+)$ /dispatch.fcgi?$1 [L] > > > Maybe try > > RewriteRule ^(/[^.]*)$ /dispatch.fcgi?$1 [L] > > i think / will not match the regex with +In my last email on the subject I forgot to include: My IsapiRewrite4.ini contains: IterationLimit 0 RewriteRule ^(.*)$ /dispatch.fcgi?$1 The changes to request.rb were: (mind the line wrap) ##################################################### else # REQUEST_URI is blank under IIS - get this from PATH_INFO and SCRIPT_NAME script_filename = env["SCRIPT_NAME"].to_s.match(%r{[^/]+$}) #request_uri = env["PATH_INFO"] #request_uri.sub!(/#{script_filename}\?\//, '''') unless script_filename.nil? #request_uri += ''?'' + env["QUERY_STRING"] unless env["QUERY_STRING"].nil? || env["QUERY_STRING"].empty? request_uri = env["QUERY_STRING"] return request_uri ##################################################### xev _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
I''ve created a small writeup on how I got my setup running. Check it at http://www.bitslapped.nl/articles/2005/06/05/rails-on-windows-2003. It works for me but I feel there is room for improvement ;-). Let me know your feedback. Boris -----Original Message----- From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of boris Sent: dinsdag 24 mei 2005 22:17 To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: RE: [Rails] Success - Rails, FastCGI, and IIS / Windows Server RewriteRule ^(.*)$ /dispatch.fcgi?$1 works for me, now http://localhost/ gets handled perfectly I''ve tried your suggestion for changing the request.rb and this does not work in my setup. Actually I did not need to change a single thing on the ruby rails part after installing the RubyForApache-beta2.exe. After I changed the request.rb only my default controller path worked (my ''homepage''), no other url would make a difference. I think it is specific to Windows2000/WindowsXP vs. Windows 2003. Coming to think of it, I''m pretty sure it is IIS/Windows version specific. I once had a similar problem with PHP (Wordpress on IIS) and found out there were similar differences. I can''t find my notes on the wordpress support site unfortunately for the details, but for now I''m convinced that on a 2003 box you should not change request.rb. So I also did a basic performance test on my laptop and it seems its holding okay. I configured the Microsoft Application Center Test (weird name) to mimic 5 browsers requesting the homepage (basic Typo homepage with a random image served by Ruby/Rails). It averaged 17,09 request per second, which is faster than most java apps would do, so I''m happy for now. I ran it for 5 minutes, and the first minute the average is something like 11 request per second. It seems getting these rubyw.exe''s up to speed takes a lot of time and cpu power. Memory was really good, cpu through the roof though. /Boris -----Original Message----- From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Xevious Sent: dinsdag 24 mei 2005 16:29 To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails] Success - Rails, FastCGI, and IIS / Windows Server Michel Rasschaert wrote:> 2005/5/23, boris <boris-OWJDjcdC7C/2dWTfsa9fiw@public.gmane.org>: >>[ISAPI_Rewrite] >>RepeatLimit 0 >>RewriteRule ^(/[^.]+)$ /dispatch.fcgi?$1 [L] > > > Maybe try > > RewriteRule ^(/[^.]*)$ /dispatch.fcgi?$1 [L] > > i think / will not match the regex with +In my last email on the subject I forgot to include: My IsapiRewrite4.ini contains: IterationLimit 0 RewriteRule ^(.*)$ /dispatch.fcgi?$1 The changes to request.rb were: (mind the line wrap) ##################################################### else # REQUEST_URI is blank under IIS - get this from PATH_INFO and SCRIPT_NAME script_filename = env["SCRIPT_NAME"].to_s.match(%r{[^/]+$}) #request_uri = env["PATH_INFO"] #request_uri.sub!(/#{script_filename}\?\//, '''') unless script_filename.nil? #request_uri += ''?'' + env["QUERY_STRING"] unless env["QUERY_STRING"].nil? || env["QUERY_STRING"].empty? request_uri = env["QUERY_STRING"] return request_uri ##################################################### xev _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Charles Leeds
2005-Jun-06 18:36 UTC
Re: Success - Rails, FastCGI, and IIS / Windows Server
Thanks for the great writeup Boris. Very, very good. Is there no way to run multiple rails apps using a single instance of IIS and FastCGI? It appears you have to set a registry key that confines you to a single rails app. Thanks, Charles boris wrote:>I''ve created a small writeup on how I got my setup running. Check it at >http://www.bitslapped.nl/articles/2005/06/05/rails-on-windows-2003. It works >for me but I feel there is room for improvement ;-). Let me know your >feedback. > >Boris > >-----Original Message----- >From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >[mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of boris >Sent: dinsdag 24 mei 2005 22:17 >To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >Subject: RE: [Rails] Success - Rails, FastCGI, and IIS / Windows Server > >RewriteRule ^(.*)$ /dispatch.fcgi?$1 works for me, now http://localhost/ >gets handled perfectly > >I''ve tried your suggestion for changing the request.rb and this does not >work in my setup. Actually I did not need to change a single thing on the >ruby rails part after installing the RubyForApache-beta2.exe. After I >changed the request.rb only my default controller path worked (my >''homepage''), no other url would make a difference. I think it is specific to >Windows2000/WindowsXP vs. Windows 2003. > >Coming to think of it, I''m pretty sure it is IIS/Windows version specific. I >once had a similar problem with PHP (Wordpress on IIS) and found out there >were similar differences. I can''t find my notes on the wordpress support >site unfortunately for the details, but for now I''m convinced that on a 2003 >box you should not change request.rb. > >So I also did a basic performance test on my laptop and it seems its holding >okay. I configured the Microsoft Application Center Test (weird name) to >mimic 5 browsers requesting the homepage (basic Typo homepage with a random >image served by Ruby/Rails). It averaged 17,09 request per second, which is >faster than most java apps would do, so I''m happy for now. I ran it for 5 >minutes, and the first minute the average is something like 11 request per >second. It seems getting these rubyw.exe''s up to speed takes a lot of time >and cpu power. Memory was really good, cpu through the roof though. > >/Boris > > >-----Original Message----- >From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >[mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Xevious >Sent: dinsdag 24 mei 2005 16:29 >To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >Subject: Re: [Rails] Success - Rails, FastCGI, and IIS / Windows Server > >Michel Rasschaert wrote: > > >>2005/5/23, boris <boris-OWJDjcdC7C/2dWTfsa9fiw@public.gmane.org>: >> >> >>>[ISAPI_Rewrite] >>>RepeatLimit 0 >>>RewriteRule ^(/[^.]+)$ /dispatch.fcgi?$1 [L] >>> >>> >>Maybe try >> >>RewriteRule ^(/[^.]*)$ /dispatch.fcgi?$1 [L] >> >>i think / will not match the regex with + >> >> > > >In my last email on the subject I forgot to include: > >My IsapiRewrite4.ini contains: > > IterationLimit 0 > RewriteRule ^(.*)$ /dispatch.fcgi?$1 > > >The changes to request.rb were: >(mind the line wrap) > >##################################################### >else # REQUEST_URI is blank under IIS - get this from PATH_INFO and >SCRIPT_NAME > script_filename = env["SCRIPT_NAME"].to_s.match(%r{[^/]+$}) > #request_uri = env["PATH_INFO"] > #request_uri.sub!(/#{script_filename}\?\//, '''') unless >script_filename.nil? > #request_uri += ''?'' + env["QUERY_STRING"] unless >env["QUERY_STRING"].nil? || env["QUERY_STRING"].empty? > > request_uri = env["QUERY_STRING"] > > return request_uri >##################################################### > >xev > >_______________________________________________ >Rails mailing list >Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >http://lists.rubyonrails.org/mailman/listinfo/rails > >_______________________________________________ >Rails mailing list >Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >http://lists.rubyonrails.org/mailman/listinfo/rails > >_______________________________________________ >Rails mailing list >Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >http://lists.rubyonrails.org/mailman/listinfo/rails > > > > >
Glad you like it Charles. Right now I have two rails apps running actually. To get this, I basically renamed fcgi to gcgi everywhere I could think of. The steps for this were: 1. rename the dispatch.fcgi file in the public folder to dispatch.gcgi 2. alter rewrite rule to redirect to the dispatch.gcgi file 3. add an application extension for .gcgi wich other than that is similar to the .fcgi extension 4. add a .gcgi key in the registry, with a different Args key and Bind-Path key. Hope this helps. Regards, Boris -----Original Message----- From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Charles Leeds Sent: maandag 6 juni 2005 20:36 To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails] Success - Rails, FastCGI, and IIS / Windows Server Thanks for the great writeup Boris. Very, very good. Is there no way to run multiple rails apps using a single instance of IIS and FastCGI? It appears you have to set a registry key that confines you to a single rails app. Thanks, Charles boris wrote:>I''ve created a small writeup on how I got my setup running. Check it at >http://www.bitslapped.nl/articles/2005/06/05/rails-on-windows-2003. It >works for me but I feel there is room for improvement ;-). Let me know >your feedback. > >Boris > >-----Original Message----- >From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >[mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of boris >Sent: dinsdag 24 mei 2005 22:17 >To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >Subject: RE: [Rails] Success - Rails, FastCGI, and IIS / Windows Server > >RewriteRule ^(.*)$ /dispatch.fcgi?$1 works for me, now >http://localhost/ gets handled perfectly > >I''ve tried your suggestion for changing the request.rb and this does >not work in my setup. Actually I did not need to change a single thing >on the ruby rails part after installing the RubyForApache-beta2.exe. >After I changed the request.rb only my default controller path worked >(my ''homepage''), no other url would make a difference. I think it is >specific to Windows2000/WindowsXP vs. Windows 2003. > >Coming to think of it, I''m pretty sure it is IIS/Windows version >specific. I once had a similar problem with PHP (Wordpress on IIS) and >found out there were similar differences. I can''t find my notes on the >wordpress support site unfortunately for the details, but for now I''m >convinced that on a 2003 box you should not change request.rb. > >So I also did a basic performance test on my laptop and it seems its >holding okay. I configured the Microsoft Application Center Test (weird >name) to mimic 5 browsers requesting the homepage (basic Typo homepage >with a random image served by Ruby/Rails). It averaged 17,09 request >per second, which is faster than most java apps would do, so I''m happy >for now. I ran it for 5 minutes, and the first minute the average is >something like 11 request per second. It seems getting these >rubyw.exe''s up to speed takes a lot of time and cpu power. Memory wasreally good, cpu through the roof though.> >/Boris > > >-----Original Message----- >From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >[mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Xevious >Sent: dinsdag 24 mei 2005 16:29 >To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >Subject: Re: [Rails] Success - Rails, FastCGI, and IIS / Windows Server > >Michel Rasschaert wrote: > > >>2005/5/23, boris <boris-OWJDjcdC7C/2dWTfsa9fiw@public.gmane.org>: >> >> >>>[ISAPI_Rewrite] >>>RepeatLimit 0 >>>RewriteRule ^(/[^.]+)$ /dispatch.fcgi?$1 [L] >>> >>> >>Maybe try >> >>RewriteRule ^(/[^.]*)$ /dispatch.fcgi?$1 [L] >> >>i think / will not match the regex with + >> >> > > >In my last email on the subject I forgot to include: > >My IsapiRewrite4.ini contains: > > IterationLimit 0 > RewriteRule ^(.*)$ /dispatch.fcgi?$1 > > >The changes to request.rb were: >(mind the line wrap) > >##################################################### >else # REQUEST_URI is blank under IIS - get this from PATH_INFO and >SCRIPT_NAME > script_filename = env["SCRIPT_NAME"].to_s.match(%r{[^/]+$}) > #request_uri = env["PATH_INFO"] > #request_uri.sub!(/#{script_filename}\?\//, '''') unless >script_filename.nil? > #request_uri += ''?'' + env["QUERY_STRING"] unless >env["QUERY_STRING"].nil? || env["QUERY_STRING"].empty? > > request_uri = env["QUERY_STRING"] > > return request_uri >##################################################### > >xev > >_______________________________________________ >Rails mailing list >Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >http://lists.rubyonrails.org/mailman/listinfo/rails > >_______________________________________________ >Rails mailing list >Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >http://lists.rubyonrails.org/mailman/listinfo/rails > >_______________________________________________ >Rails mailing list >Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >http://lists.rubyonrails.org/mailman/listinfo/rails > > > > >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails