Rails 3 + Nginx + Passenger -- Routing index
Posted
by
Bijan
on Server Fault
See other posts from Server Fault
or by Bijan
Published on 2011-02-09T00:59:01Z
Indexed on
2011/03/17
16:12 UTC
Read the original article
Hit count: 233
I have no index.html file in my public folder. My rails routes file routes this, and it works fine when I run 'rails server' on my machine.
I'm trying to deploy the app. I have passenger and nginx running When I run rails server on my local machine, it works fine. But it's just trying to access static file when I try to access it on the production server.
Here's my nginx conf:
worker_processes 1;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
passenger_root /usr/lib/ruby/gems/1.9.1/gems/passenger-3.0.2;
passenger_ruby /usr/bin/ruby;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name mmjconsult.com;
root /www/mmjs/public;
access_log logs/host.access.log;
passenger_enabled on;
}
}
Thank you for any help. I really appreciate it.
© Server Fault or respective owner