I want to run rails 3 and rails 2.3.8 apps on the same machine. I currently have Passenger setup with Ruby 1.9.2 for my rails 3 apps and that is working fine with Apache. I found the following at the Phusion website and am trying out the reverse proxy :
http://blog.phusion.nl/2010/09/21/phusion-passenger-running-multiple-ruby-versions/
My Apache vhost file for this app looks like:
<VirtualHost *:80>
ServerName gtt
DocumentRoot /home/purvez/www/gtt/public
RailsEnv development
PassengerEnabled off
ProxyPass / http://127.0.0.1:3000
ProxyPassReverse / http://127.0.0.1:3000
</VirtualHost>
I can correctly access the app using passenger standalone using:
127.0.0.1:3000/start
but when I try to access it as :
http://gtt/start
I get a message saying:
No route matches [GET] "/start"
The Apache 'other_vhosts_access.log' however shows this entry:
testapp:80 127.0.0.1 - - [20/Oct/2011:15:27:58 +0100] "GET /start HTTP/1.1" 404 737 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1"
As you can see it is trying to call testapp:80 rather than gtt:80. I have both these in my /etc/hosts file and in fact gtt is BEFORE testapp!
What am I doing wrong here and how to put it right?
Edit
I am mega embarrassed! I had not enabled the site on Ubuntu and hence it was looking at the only available site i.e. testapp.
However having corrected the problem I'm still getting a 500 Error. The 'other_vhosts_access.log' entry shows:
gtt:80 127.0.0.1 - - [20/Oct/2011:18:07:30 +0100] "GET /start HTTP/1.1" 500 599 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1"
It's almost like the proxy to Passenger standalone is not happening and that Apache is trying to get start itself. Certainly the passenger.3000.log (i.e. standalone Passenger log) is showing no activity at all!
So having made a monumental blunder and wasted everyone's time initially I'm still in the same boat in that it looks like the Proxy is not happening!!
Anyone got any ideas?