I am new to nginx and trying to run Redmine 2.3 using ruby ββ2.0.0, phusion passenger 4.0.2 and nginx 1.4.1. This is compiled from the patch-install-nginx script on the ARMv5te system in Arch Linux ARM.
In nginx log I get the following: (Note: I removed the server name from / configs logs)
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"
The last error occurs constantly when I do an HTTP POST on any page in redmine. HTTP GET requests work fine with displayed pages.
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; }
sites with support for /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/; } }
One thing that may be relevant is that I can run redmine perfectly if I use the ruby ββwebrick built-in server, so I guess this is probably a nginx / passenger issue. Has anyone understood what the problem is?
source share