502 Bad Gateway- Nginx and thin

Yunior Miguel A. lists at ruby-forum.com
Mon Mar 18 19:53:10 UTC 2013


Thans for all. The end configuration:

thin configuration:

chdir: /var/www/redmine/
environment: production
address: 127.0.0.1
port: 3000
timeout: 30
log: /var/log/thin/gespro.log
pid: tmp/pids/thin.pid
max_conns: 1024
max_persistent_conns: 512
require: []
wait: 30
servers: 1
daemonize: true
socket: /tmp/thin.sock
group: www-data
user: www-data

ngin configuration:

upstream thin_cluster {
    server unix:/tmp/thin.0.sock;
   # server unix:/tmp/thin.1.sock;
   # server unix:/tmp/thin.2.sock;
}

server {

  listen   80; ## listen for ipv4

  # Set appropriately for virtual hosting and to use 
server_name_in_redirect
  server_name  redmine.ipp.uci.cu;
  server_name_in_redirect off;

  access_log  /var/log/nginx/localhost.access.log;
  error_log  /var/log/nginx/localhost.error.log;

  # Note: Documentation says proxy_set_header should work in location
  #       block, but testing did not support this statement so it has
  #       been placed here in server block
  include /etc/nginx/proxy_opts;
  proxy_redirect off;

  # Note:  Must match the prefix used in Thin configuration for Redmine
  #        or / if no prefix configured
  location / {
    root   /var/www/redmine/public;

    error_page 404  404.html;
    error_page 500 502 503 504  500.html;
  try_files $uri/index.html $uri.html $uri @redmine_thin_servers;
  }

  location @redmine_thin_servers {
    proxy_pass http://thin_cluster;
  }
}

thanks for all.

-- 
Posted via http://www.ruby-forum.com/.



More information about the nginx mailing list