# $OpenBSD: nginx-passenger.conf.sample,v 1.4 2013/05/07 23:20:11 jeremy Exp $
#
# Example nginx.conf for Phusion Passenger
#
# Please read the official Phusion Passenger user guide for nginx.
# http://www.modrails.com/documentation/Users guide Nginx.html

user www;
worker_processes  1;

events {
    worker_connections  1024;
}

error_log  /var/www/logs/error.log;

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

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    keepalive_timeout  65;

    # The passenger root. (passenger-config --root)
    passenger_root /usr/local/lib/phusion-passenger19;

    # Some more
    passenger_log_level 1;
    passenger_ruby /usr/local/bin/ruby19;

    server {
        listen       80;
        server_name  localhost;

        passenger_enabled on; # actually enable passenger for this vhost
        rails_env production; # set the RAILS_ENV

        # Path to the public folder of your rails app.
        root   /var/www/app/public;

        access_log  /var/www/logs/access.log  main;
    }
}
