title: nginx passenger rails No data received
body: <p>I am new to nginx and passenger and want to use it to run a rails application.</p>
  
  <p>I have installed nginx and passenger on my mac (<code>passenger-install-nginx-module</code>). </p>
  
  <p>I can start the nginx server and see the default nginx welcome screen.</p>
  
  <p>I want to run a rails app on my nginx server. </p>
  
  <p>I have added the following to the <strong>nginx.conf</strong>:</p>
  
  <pre><code>server {
    listen 8080;
    server_name localhost;
    root /myrailsApp/public;   # &lt;--- be sure to point to 'public'!
    passenger_enabled on;
  }
  </code></pre>
  
  <p>When I start my nginx server and navigate to localhost:8080 I see the message: </p>
  
  <blockquote>
    <p>"No data received" (Error code: ERR_EMPTY_RESPONSE)</p>
  </blockquote>
  
  <p>I am guessing this is a silly mistake that I have overlooked? Could someone please point me in the right direction?</p>
  
  <hr>
  
  <p>Bit more information that may help.</p>
  
  <p>which ruby returns:</p>
  
  <blockquote>
    <p>/Users/user/.rvm/rubies/ruby-1.9.3-p429/bin/ruby</p>
  </blockquote>
  
  <p>I installed using:</p>
  
  <blockquote>
    <p>gem install passenger</p>
  </blockquote>
  
  <p>passenger-config --root returns:</p>
  
  <blockquote>
    <p>/Users/user/.rvm/gems/ruby-1.9.3-p429@rails3tutorial2ndEd/gems/passenger-4.0.20</p>
  </blockquote>
  
  <p>Is this (<code>@rails3tutorial2ndEd/gems/passenger-4.0.20</code>) not a little strange ?</p>
  
  <p>I then ran the passenger nginx installer:</p>
  
  <blockquote>
    <p>passenger-install-nginx-module</p>
  </blockquote>
  
  <p>As I said, I can start nginx with no problems. I added the new server block to the nginx.conf file pointing to my rails public folder but the page returns </p>
  
  <blockquote>
    <p>"No data received"</p>
  </blockquote>