gpt4 book ai didi

ruby - Redmine 2.3、ruby 2.0.0、nginx 1.4.1 和 passenger 4.0.2 所有 HTTP POST 失败

转载 作者:数据小太阳 更新时间:2023-10-29 07:40:11 24 4
gpt4 key购买 nike

我是 nginx 的新手,正在尝试使用 ruby​​ 2.0.0、phusion passenger 4.0.2 和 nginx 1.4.1 运行 Redmine 2.3。这是从 Arch Linux ARM 中的 ARMv5te 系统上的 passenger-install-nginx 脚本编译而来。

我在 nginx 日志中得到以下信息:(注意:我已经从日志/配置中删除了服务器名称)

2013/05/08 23:41:12 [notice] 1359#0: signal process started
[ 2013-05-08 23:41:13.1325 1367/b6f9a000 agents/HelperAgent/Main.cpp:554 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.1363/generation-0/request.socket
[ 2013-05-08 23:41:13.2641 1387/b6f26000 agents/HelperAgent/Main.cpp:554 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.1381/generation-0/request.socket
[ 2013-05-08 23:41:13.3028 1392/b6faa000 agents/LoggingAgent/Main.cpp:272 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.1381/generation-0/logging.socket
[ 2013-05-08 23:41:15.9700 1387/b59ff450 Pool2/Spawner.h:739 ]: [App 1408 stdout]
[ 2013-05-08 23:41:43.5820 1387/b6b4a450 Pool2/Spawner.h:159 ]: [App 1408 stderr] /var/www/sites/public-redmine-2.3/lib/SVG/Graph/Graph.rb:3: warning: class variable access from
toplevel
[ 2013-05-08 23:41:55.8491 1387/b59ff450 Pool2/Spawner.h:739 ]: [App 1439 stdout]
[ 2013-05-08 23:44:15.2842 1387/b57ff450 agents/HelperAgent/RequestHandler.h:581 ]: [Client 20] Disconnecting with error: invalid SCGI header
2013/05/08 23:44:15 [error] 1402#0: *3 upstream prematurely closed connection while reading response header from upstream, client: 192.168.4.254, server: (removed), request: "POST /login HTTP/1.1", upstream: "passenger:/tmp/passenger.1.0.1381/generation-0/request.socket:", host: "(removed)", referrer: "http://(removed)/login"

每当我在 redmine 中的任何页面上执行 HTTP POST 时,最后一个错误始终发生。 HTTP GET 请求可以很好地处理呈现的页面。

nginx.conf

worker_processes  2;

events {
worker_connections 1024;
}


http {
passenger_root /usr/lib/ruby/gems/2.0.0/gems/passenger-4.0.2;
passenger_ruby /usr/bin/ruby;

passenger_max_pool_size 2;
passenger_pool_idle_time 120;
passenger_pre_start http://(removed)/;
passenger_spawn_method smart;


include mime.types;
default_type application/octet-stream;

sendfile on;

keepalive_timeout 65;
server {
listen 80;
server_name localhost;

location / {
root html;
index index.html index.htm;
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}

include sites-enabled/*.conf;
}

启用站点/redmine.conf

server {
listen *:80;
server_name (removed);

passenger_enabled on;
rails_env production;

passenger_spawn_method conservative;

root /var/www/sites/kamikaze-kb/public;

location /plugin_assets/ {
root /var/www/sites/kamikaze-kb/public/plugin_assets/;
}
}

可能相关的一件事 - 如果我使用内置的 ruby​​ webrick 服务器,我可以正常运行 redmine,所以我猜这可能是 nginx/passenger 问题。有人知道问题出在哪里吗?

最佳答案

看起来这个问题与 arm 平台有关。

我在 arm 上遇到了同样的问题,但相同的代码和配置在 x86 上工作正常。

关于ruby - Redmine 2.3、ruby 2.0.0、nginx 1.4.1 和 passenger 4.0.2 所有 HTTP POST 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16443705/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com