Nginx乘客不可见应用程序问题

Les*_*iev 3 ubuntu ruby-on-rails nginx

我有:Ubuntu 12.04 LTS
ruby-1.9.3-p194
Rails 3.2.7

我试图通过Nginx + Passenger访问我的Rails应用程序.

/opt/nginx/conf/nginx.conf文件是:

user  test;
worker_processes  1;

events {
    worker_connections  1024;
}

http {
    passenger_root /home/test/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.14;
    passenger_ruby /home/test/.rvm/wrappers/ruby-1.9.3-p194/ruby;

    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;

    server {
        listen       80;
        server_name  10.11.11.178;

        root /efiling/public;
        passenger_enabled on;

        location / {
            root   html;
            index  index.html index.htm;
        }
....
Run Code Online (Sandbox Code Playgroud)

当我输入链接10.11.11.178时,我得到欢迎来到nginx!
但我期待获得Rails应用程序默认页面.

怎么了?提前致谢.


@Jashwant.首先,我删除了@Brandon提到的行.其次,我从my_app\public文件夹中删除了index.html文件.

小智 6

尝试从配置中删除以下内容:

    location / {
        root   html;
        index  index.html index.htm;
    }
Run Code Online (Sandbox Code Playgroud)