ruby-on-rails – Passenger,Nginx和Capistrano – 乘客根本不启动Rails应用程序
作者:互联网
从本质上讲,我的路线运作完美,乘客似乎正在装载 – 所有都是笨拙的.除了没有Railsy发生.这是从启动服务器到第一个请求的我的Nginx日志(忽略不同的域/路由 – 这是因为我还没有移动新域,并且它返回403错误,因为公共文件夹中没有索引文件):
[ pid=24559 file=ext/nginx/HelperServer.cpp:826 time=2009-11-10 00:49:13.227 ]:
Passenger helper server started on PID 24559
[ pid=24559 file=ext/nginx/HelperServer.cpp:831 time=2009-11-10 00:49:13.227 ]:
Password received.
2009/11/10 00:49:53 [error] 24578#0: *1 directory index of "/var/www/***/current/public/" is forbidden, client: 188.221.195.27, server: ***, request: "GET / HTTP/1.1", host: "***"
2009/11/10 00:49:54 [error] 24578#0: *1 open() "/var/www/***/current/public/favicon.ico" failed (2: No such file or directory), client: 188.221.195.27, server: ***, request: "GET /favicon.ico HTTP/1.1", host: "***", referrer: "***"
RubyOnRails IRC频道上的某人建议它可能是网络服务器权限问题.我怀疑它可能是文件系统权限问题,但随后Nginx以root身份运行为www-data和Passenger.
我可以从公共目录中加载静态文件,但是没有启动任何Rails应用程序.有没有人有想法?我的头逐渐消失,想出这一个!
编辑:这是vhost文件:
server {
listen 80;
server_name ***;
passenger_enabled on;
location / {
root /var/www/***/current/public;
index index.html index.htm;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
解决方法:
问题解决了,我是一个扳手.
我有’乘客开机了’;在’location /’里面’不是’服务器’.我亲自递交编码手.
标签:nginx,ruby-on-rails,ruby,passenger,capistrano 来源: https://codeday.me/bug/20190607/1192150.html