ruby - nginx and passenger to run my rails application -
i'm new rails , trying deploy rails app (which runs on computer using rails server) on server.
my server has nginx , passenger both installed , working fine. however, when change nginx config file @ /opt/nginx/conf/nginx.conf follows
.... passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini; passenger_ruby /usr/bin/ruby1.9.1; .... server {     listen       80;     server_name  localhost;      #charset koi8-r;                                                                                                                                                                                          #access_log  logs/host.access.log  main;                                                                                                                                                                  location / {         root   /home/path_to_my_app/public;         index  index.html index.htm;     }      passenger_enabled on; }   it doesn't work. i'm not able call rails code. keeps saying 404 error.
i restarted nginx using service nginx restart returned ok, still no luck.
can tell how debug this. should check applications passenger running? part i'm missing?
edit: i'm following documentation closely
it seems there no /home/path_to_my_app/public directory.
in passenger version 5.0.7 directory access has been changed. if root directory doesn't exist falls nginx search index.html , gives 404 error if there such file.
[nginx] nginx module looks index.html if path ends in / works intuitively, without needing use try_files.
Comments
Post a Comment