Rails + Passenger + Nginx 404未找到

时间:2018-06-05 12:41:03

标签: ruby-on-rails ruby nginx passenger redmine

我正在使用Rails + Passenger + Nginx

我的项目(Redmine)位于/ var / www / tracker-continuity / current(以及公共项目)。

我不知道为什么当我尝试访问我的服务器时,它总是一个404错误页面。我们可以在日志中看到它

[ N 2018-06-05 14:23:20.6491 20067/T1 age/Cor/CoreMain.cpp:1236 ]: Starting Passenger core...
[ N 2018-06-05 14:23:20.6494 20067/T1 age/Cor/CoreMain.cpp:251 ]: Passenger core running in multi-application mode.
[ N 2018-06-05 14:23:20.6631 20067/T1 age/Cor/CoreMain.cpp:971 ]: Passenger core online, PID 20067

2018/06/05 14:23:31 [error] 20084#20084: *1 "/var/www/trackeur-continuity/current/public/index.html" is not found (2: No such file or directory), client: someIp, server: hideUrl, request: "GET / HTTP/1.1", host: "hideIp"

这里是我nginx.conf的一部分和我的vhost conf。从Nginx转储配置中提取。 (仅限乘客部分)

error_log  /var/log/nginx/error.log warn;
pid  /var/run/nginx.pid;
user  www-data;
worker_processes  4;


include /etc/nginx/modules-enabled/*.conf;

http {

    ...
}


# configuration file /etc/nginx/conf.d/mod-http-passenger.conf:
### Begin automatically installed Phusion Passenger config snippet ###
passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini;
passenger_ruby /usr/bin/passenger_free_ruby;
### End automatically installed Phusion Passenger config snippet ###


}

server {

listen 80;
server_name default_server ;

charset utf-8;
root /var/www/trackeur-continuity/current/public;

access_log /var/log/nginx/access.log timed_combined buffer=16k;
error_log /var/log/nginx/error.log;

passenger_enabled on;
rails_env development;
client_max_body_size 110m;

}

1 个答案:

答案 0 :(得分:1)

知道了!

tracker-continuity不是trackeur-continuity