Note that there are some explanatory texts on larger screens.

plurals
  1. POApache/Passenger reverse proxy to Passenger standalone not working
    primarykey
    data
    text
    <p>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 :</p> <p><a href="http://blog.phusion.nl/2010/09/21/phusion-passenger-running-multiple-ruby-versions/" rel="nofollow noreferrer">http://blog.phusion.nl/2010/09/21/phusion-passenger-running-multiple-ruby-versions/</a></p> <p>My Apache vhost file for this app looks like:</p> <pre><code>&lt;VirtualHost *:80&gt; 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 &lt;/VirtualHost&gt; </code></pre> <p>I can correctly access the app using passenger standalone using:</p> <pre><code>127.0.0.1:3000/start </code></pre> <p>but when I try to access it as :</p> <p><code>http://gtt/start</code></p> <p>I get a message saying:</p> <p>No route matches [GET] "/start"</p> <p>The Apache 'other_vhosts_access.log' however shows this entry:</p> <pre><code>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" </code></pre> <p>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!</p> <p>What am I doing wrong here and how to put it right?</p> <h2>Edit</h2> <p>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.</p> <p>However having corrected the problem I'm still getting a 500 Error. The 'other_vhosts_access.log' entry shows:</p> <pre><code>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" </code></pre> <p>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!</p> <p>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!!</p> <p>Anyone got any ideas?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload