title: How to configure nginx with passenger with rails application
body: <p>I have followed this tutorial <a href="https://www.digitalocean.com/community/articles/how-to-install-rails-and-nginx-with-passenger-on-ubuntu" rel="nofollow">https://www.digitalocean.com/community/articles/how-to-install-rails-and-nginx-with-passenger-on-ubuntu</a></p>
  
  <p>I have installed passenger with nginx on my virtual machine and trying to access the site.</p>
  
  <p>In the root I have specified path as <code>root /var/rails_apps/public/;</code> which give me Welcome to Nginx page,</p>
  
  <pre><code>server{
                      listen 80;
                      server_name localhost;
                      root /var/rails_apps/public/;
                      passenger_enabled on;
  
              }
  </code></pre>
  
  <p>As my root page of my site is in the <code>/var/rails_apps/app/views/home/index.html.erb</code> 
  so I changed the path to <code>root /var/rails_apps/app/views/home/;</code> </p>
  
  <pre><code>server{
                  listen 80;
                  server_name localhost;
                  root /var/rails_apps/app/views/home/;
                  passenger_enabled on;
  
          }
  </code></pre>
  
  <p>but still for both root I am getting <code>Welcome to Nginx</code> page.</p>
  
  <p>My request URL is like this ->  /#{IpAddressOfVirtualMachine}:80/</p>
  
  <p>When I specified different port for listening eg 1027 then it gives me error <code>Unable to connect</code>
  Please explain how I can get my site running using nginx and passenger, is there any other setting required?</p>