user deploy;
worker_processes 4;
pid /run/nginx.pid;

events {
  worker_connections 768;
}

http {
  sendfile on;
  tcp_nopush on;
  tcp_nodelay on;
  keepalive_timeout 65;
  types_hash_max_size 2048;
  include /etc/nginx/mime.types;
  default_type application/octet-stream;

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

  gzip on;
  gzip_disable "msie6";

  passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini;

  # Replace 'deploy' with your username.
  passenger_ruby /home/deploy/.rbenv/shims/ruby;

  server {
    # Change this to your domain name.
    server_name yoursite.example.com;

    # Ensure this is the path to the public folder of the elmo code.
    root /home/deploy/elmo/public;

    passenger_enabled on;
    rails_env production;

    client_max_body_size 50m;

    # Redirect server error pages to the static page /50x.html
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
      root html;
    }
  }
}
