Rails With Apache?!?!?!?!?!

I am at my wits end trying to get Rails running through Apache. After
digging through countless “how-tos” on the web, I’m stuck.

I’m running Suse 10, Apache 2, and want to be able to enter in my PCs IP
and a subdirectory and bring up the Rails upp, e.g.
192.168.10.10/railsapp

But I cannot figure how to do so.

This is my virtualhost declaration:

<VirtualHost *:80>
ServerName railsapp
DocumentRoot /home/nathan/rails/railsapp/public
<Directory /home/nathan/rails/railsapp/public >
Options ExecCGI FollowSymLinks
AllowOverride all
Allow from all
Order allow,deny

Can anyone point me in the right direction for how to accomplish this?

Thanks in advance,

Nathan

Nathan M.

Operations Director

Northeast Region

Pilgrim IT, LLC

NORTHEAST OFFICE

1 Short Street

Northampton, MA 01060

TEL 866.434.4976

FAX 413.587.0572

MIDWEST OFFICE

1815 Brownsboro Road

Louisville, KY 40206

TEL 502.721.7939

FAX 502.721.7940

NOTICE: This email and any attachments are intended only for the
addressee and may contain information that is confidential and/or
legally privileged. If you are not the intended recipient or have
received this email in error, please notify the sender by return email
or by calling 866-434-4976. You should then delete the message and any
attachments or copies. If you are not the intended recipient, you are
prohibited from retaining, distributing, disclosing or using any
information contained herein.

On Fri, 25 Nov 2005, Nathan M. wrote:

I’m running Suse 10, Apache 2, and want to be able to enter in my PCs IP
and a subdirectory and bring up the Rails upp, e.g.
192.168.10.10/railsapp

What errors do you actually get? What gets logged in the server
logs when the browser fails to get your app?

But I cannot figure how to do so.

This is my virtualhost declaration:

<VirtualHost *:80>
ServerName railsapp

If that is the name of your application should it be a server name
as well?

   DocumentRoot /home/nathan/rails/railsapp/public
   <Directory /home/nathan/rails/railsapp/public >
           Options ExecCGI FollowSymLinks
           AllowOverride all
           Allow from all
           Order allow,deny
   </Directory>

and you have the stuff like:

AddType application/x-httpd-eruby .rhtml
Action application/x-http-eruby /cgi-bin/eruby

setup as well?

http://www.rubyonrails.com/rails/show/GettingStartedWithRails

Can anyone point me in the right direction for how to accomplish this?

http://www.rubyonrails.com/rails/show/GettingStartedWithRails

was of help to me as far as I got. I’ve not finished yet.

Thanks in advance,

Nathan

    Hugh

On 25 Nov 2005, at 16:46, Nathan M. wrote:

           Allow from all
           Order allow,deny
   </Directory>

And what happens when you point a browser to:
http://railsapp/

Nathan M. wrote:

I am at my wits end trying to get Rails running through Apache. After
digging through countless ?how-tos? on the web, I?m stuck.

I?m running Suse 10, Apache 2, and want to be able to enter in my PCs IP
and a subdirectory and bring up the Rails upp, e.g. 192.168.10.10/railsapp

But I cannot figure how to do so.

What you are looking for is advice on how to run multiple Rails apps on
the same server, without using virtual hosts. I haven’t tried it yet,
but Scott L.'s advice here looks promising:

He says you should have a FastCgiServer line for each application.

See comments 2 and 8 on the article, and Scott’s responses.

Example (from comment 2)

FastCgiServer /rails_app_1/dispatch.fcgi
-idle-timeout 120
-initial-env RAILS_ENV=production
-processes 10

FastCgiServer /rails_app_2/dispatch.fcgi
-idle-timeout 120
-initial-env RAILS_ENV=production
-processes 10

(note that the numbers of statically allocated processes here are high -
Scott says 2 should be fine unless you are dealing with heavy traffic)

Please tell us if that works for you.

regards

Justin