我: Ubuntu的LTS 12.04
紅寶石1.9.3-P194
的Rails 3.2.7Nginx的乘客不可見的應用程序問題
我試圖訪問通過的Nginx +客運我的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文件。
你的要求去'的位置/ {'。有用的鏈接:http://nginx.org/r/location和http://nginx.org/en/docs/http/request_processing.html – VBart 2012-07-30 22:56:18
謝謝。但我該怎麼辦?從配置中刪除**位置** – 2012-07-31 05:37:51
你應該提供完整的配置。在此之前,很難說清楚。 [閱讀手冊](http://www.modrails.com/documentation/Users%20guide%20Nginx.html)也是一個好主意。 – VBart 2012-07-31 11:56:34