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.
For work related reasons we are using a rackspace cloud server with MySQL as the database.
My frustration has come with setting up passenger and Nginx. I've followed Ryan's Railscasts on deploying to vps and this tutorial.
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.
Any ideas? I'm guessing there is a key step I'm missing in configuring Nginx I just don't know what it is.
My Access Log
.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)"
My Nginx.conf file
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;
}
}
}