[Instantrails-users] Apache Config Question

Curt Hibbs curt.hibbs at gmail.com
Wed Jun 7 20:24:22 EDT 2006


Excellent! Can you add instructions for this on the Instant Raiks wiki?

Thanks,
Curt

On 6/7/06, Axiom Dadak <axiomdadak at gmail.com> wrote:
>
> Ok, I solved it!
>
> It took a lot of playing around, but I've got it working now.
>
> This is how you setup a rails application in apache using aliases and
> SCGI:
>
> (in this case, my application is called scotch and it usses port 9997)
>
> httpd.conf ->
>
> Alias /scotch/ "${path}/rails_apps/scotch/public/"
> SCGIMount /scotch/dispatch.fcgi 127.0.0.1:9997
>
> <Directory "${path}/rails_apps/scotch/public">
>   Options ExecCGI
>   Options +FollowSymLinks
>   Order allow,deny
>   allow from all
> </Directory>
>
> Then in the .htaccess file in the application's public directory ->
>
> AddHandler fastcgi-script .fcgi
> AddHandler cgi-script .cgi
> Options +FollowSymLinks +ExecCGI
> RewriteEngine On
> RewriteBase /scotch
> RewriteRule ^$ index.html [QSA]
> RewriteRule ^([^.]+)$ $1.html [QSA]
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteRule ^(.*)$ /scotch/dispatch.fcgi/$1 [QSA,L]
> ErrorDocument 500 "<h2>Application error</h2>Rails application failed to
> start properly"
>
> Then, when you're ready to run your application, start the SCGI server
> through the "instantrails->manage applications" control pannel.
>
> And it works great!
>
> I'll be posting this to the wiki soon.
>
> Bram
>
> On 6/7/06, David Morton <mortonda at dgrmm.net> wrote:
>
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Axiom Dadak wrote:
> >
> > > Like I said, it works, but takes 2 mins to load each page.  I think
> > it's
> > > not using SCGI, since I don't even need to have the SCGI server
> > running
> > > for it to work.
> >
> > yeah, that sounds exactly right; the rewrite isn't matching the new
> > urls.  I'm a
> > bit busy to look into it more deeply, but if I remember right, there is
> > some
> > difficulty with getting the rewrite to work.
> >
> >
> > - --
> > David Morton
> > Maia Mailguard                        - http://www.maiamailguard.com
> > Morton Software Design and Consulting - http://www.dgrmm.net
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.2.2 (GNU/Linux)
> > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> >
> > iD8DBQFEhx6LUy30ODPkzl0RAiTxAJoCazhSyvt0T16zmXwEWa2BEUAaugCfWdxe
> > LXTNX4uDVyqvWiK0TgPKp5w=
> > =ZIR5
> > -----END PGP SIGNATURE-----
> > _______________________________________________
> > Instantrails-users mailing list
> > Instantrails-users at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/instantrails-users
> >
>
>
> _______________________________________________
> Instantrails-users mailing list
> Instantrails-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/instantrails-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/instantrails-users/attachments/20060607/33a749ba/attachment.htm 


More information about the Instantrails-users mailing list