Note that there are some explanatory texts on larger screens.

plurals
  1. POSetting up Nginx and Passenger on Ubuntu 12.04 for Rails 3.2.8 Environment
    text
    copied!<p>I'm a newby to rails and love the language and the development environment. However, I've been overly frustrated trying to push a new app to the production environment when not using PostgreSQL and/or Heroku.</p> <p>For work related reasons we are using a rackspace cloud server with MySQL as the database.</p> <p>My frustration has come with setting up passenger and Nginx. I've followed Ryan's Railscasts on <a href="http://railscasts.com/episodes/335-deploying-to-a-vps" rel="nofollow">deploying to vps</a> and <a href="http://excid3.com/blog/setting-up-rails-on-ubuntu-12-10-quantal-quetzal-with-ruby-node-js-nginx-passenger-and-mysql-or-postgres/" rel="nofollow">this</a> tutorial.</p> <p>I can get through installing ruby, mysql, passenger, Nginx, dependencies, and rails on the server. But when I try to start Nginx nothing happens. When I say nothing happens I mean I don't have any indication that it's running. I point my browser to the ip address and I get the standard error "this webpage is not available" error in the browser. I've looked at the error log and it's blank. I haven't deployed my app yet...just trying to see the default screen of Nginx.</p> <p>Any ideas? I'm guessing there is a key step I'm missing in configuring Nginx I just don't know what it is.</p> <p>My Access Log</p> <pre><code>.0.0.1 - - [14/Oct/2012:10:40:03 -0500] "GET / HTTP/1.1" 200 151 "-" "Wget/1.13.4 (linux-gnu)" 127.0.0.1 - - [14/Oct/2012:10:45:03 -0500] "GET / HTTP/1.1" 200 151 "-" "Wget/1.13.4 (linux-gnu)" 127.0.0.1 - - [14/Oct/2012:10:50:03 -0500] "GET / HTTP/1.1" 200 151 "-" "Wget/1.13.4 (linux-gnu)" 127.0.0.1 - - [14/Oct/2012:10:55:03 -0500] "GET / HTTP/1.1" 200 151 "-" "Wget/1.13.4 (linux-gnu)" 127.0.0.1 - - [14/Oct/2012:11:00:03 -0500] "GET / HTTP/1.1" 200 151 "-" "Wget/1.13.4 (linux-gnu)" </code></pre> <p>My Nginx.conf file</p> <pre><code>user deployer staff; #user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; } http { passenger_root /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.17; passenger_ruby /usr/local/bin/ruby; include mime.types; default_type application/octet-stream; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; server { listen 80; server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location / { root html; index index.html index.htm; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } } </code></pre>
 

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