Hi, I am very new to ruby, rails, and mongrel, so this may not make any sense, but i figured i would ask it anyways. I have been given the task of determining if rails is a good transition for our company. While my preliminary tests have been successful (i.e. installing mongrel, deploying a test app, etc), i have to figure out how to run our existing cgi scripts under our new environment. Previously we were using apache + mod_perl, and my question is do i still need to install mod_perl, or is mongrel optimized to handle perl in a fast fashion? secondly, how do i run a cgi script when running rails, do i simply put a cgi-bin directory in my public directory under my rails app, or is it more complicated than that (i.e. modifying my httpd.conf file to point somewhere other than rails/mongrel)? sorry for my lack of understanding of apache+rails+mongrel, but I am learning as i go. thanks!
on 2007-04-26 05:46
on 2007-04-26 06:04
On Apr 25, 2007, at 11:46 PM, email@example.com wrote: > Previously we were using apache + mod_perl, and my question is do i > still need to install mod_perl, or is mongrel optimized to handle perl > in a fast fashion? For this situation you're probably best off continuing to use mod_perl for the perl parts, and proxying the rails parts to mongrel instances. > secondly, how do i run a cgi script when running rails, do i simply > put a cgi-bin directory in my public directory under my rails app, or > is it more complicated than that (i.e. modifying my httpd.conf file to > point somewhere other than rails/mongrel)? If you're using Apache then the perl-based things don't need to be in the rails directory at all -- use the Apache configuration to tell Apache where the cgi (or mod_perl) scripts are and point the rest over to the proxy that talks to the mongrel servers. -faisal
on 2007-04-27 18:59
Hi Faisal, so I took your advice, I decided to use mod_perl and mongrel together, and I installed mod perl, and i ran it (without mongrel, and everything works fine), then i followed the following tutorial: http://blog.gwikzone.org/articles/2006/10/02/easy-... to setup a mongrel cluster (im using linux instead of a mac, but it works the same), and I tested it, and rails loaded fine, however, when i went to: mysite.com/cgi-bin/test.pl i get a Service Temporary Unavailable problem. Im assuming the problem is within my httpd.conf file, but I am not that familiar with it. Other than the stuff added in the tutorial above, I have the following cgi-related stuff: ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" <Directory "/var/www/cgi-bin"> AllowOverride None Options None Order allow,deny Allow from all </Directory> I am using apache 2.2.4 and mod_perl 2.0 any help is greatly appreciated. Thanks!