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

时间:2012-07-30 13:55:10

标签: ruby-on-rails ubuntu nginx

我有:     Ubuntu 12.04 LTS
    红宝石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;
        }
....

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

有什么问题? 提前谢谢。


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

1 个答案:

答案 0 :(得分:6)

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

    location / {
        root   html;
        index  index.html index.htm;
    }
相关问题