I just got around to catching up on the mail in this list, so sorry for
the late reply to this. Anyways, I got rails, fcgi, and apache 2.0
working on my server about a month ago. Like you, I also wanted to
preserve my php configuration and still be able to try rails without
running another web server.
The configuration I used to build apache (you don't need the 'dav' if
you're not using webdav):
./configure --enable-so --enable-dav --enable-rewrite --enable-cgi
Here is a chunk from my http.conf:
# ...httpd.conf...
LoadModule fastcgi_module modules/mod_fastcgi.so
AddHandler fastcgi-script .fcgi
# this should be all one line
# my mail client is wrapping it:
FastCgiServer /usr/local/apache2/rails/myproject/public/dispatch.fcgi
-initial-env RAILS_ENV=development -processes 2
<VirtualHost *:80>
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /usr/local/apache2/rails/myproject/public
ServerName rails.example.com
ErrorLog logs/rails-project-error
CustomLog logs/rails-project-access_log common
Options Indexes ExecCGI FollowSymLinks
RewriteEngine On
</VirtualHost>
#...rest of httpd.conf....
Unfortunately I don't remember at what point I was having the same
problems you were and what I did specifically to fix them (but I did
have them, so rest assured, you're not alone). Hope this helps a little,
if I can remember anything else I had to do, I'll write again.
- Jason
On Tue, 2005-12-13 at 15:48 -0800, Preston Crawford wrote:
> So Robby encouraged me (on my blog) not to give up on Rails. I'm close.
> It's just way too frustrating to get a working environment going. As a
> Java developer (and PHP and ASP) I'm used to stuff just working when it at
> least comes to lightweight application servers. Yeah, I know WEBrick
> works. But I've spent literally 3 days worth of effort trying to get
> Apache+Rails+FastCGI working and I just flat can't get it to work. It's
> ridiculous. I can't even run "ruby dispatch.fcgi" from the command line of
> a Rails app that works great with WEBrick. That gives me a "500 Internal
> Server Error". Ugh. WTH?
>
> I'm using CentOS 4.2, Rails 1.0 (as of a few minutes ago) and I'm just
> trying to get it running the same way WEBrick does. In a way, this is more
> proof of concept. If I can't get this working, I can't see how I'd ever,
> in a million years, use this in a production environment. Apparently there
> are wizards out there like Robby and others who can make this happen. I
> can't.
>
> And no, I can't switch to lighttpd. I need PHP support (this is all on my
> home box, but it's still needed) and don't want to have to recompile PHP
> to get Rails to play nice with my web server.
>
> Preston
>
> _______________________________________________
> PDXRuby mailing list
> [email protected]
> IRC: #pdx.rb on irc.freenode.net
> http://lists.pdxruby.org/mailman/listinfo/pdxruby
_______________________________________________
PDXRuby mailing list
[email protected]
IRC: #pdx.rb on irc.freenode.net
http://lists.pdxruby.org/mailman/listinfo/pdxruby