worker_processes  2;

error_log <%= @passenger_root %>/test/test.log;
pid       <%= @nginx_root %>/nginx.pid;

events {
    worker_connections  1024;
}

http {
    include            <%= TEMPLATE_DIR %>/mime.types;
    default_type       application/octet-stream;
    sendfile           on;
    keepalive_timeout  65;
    
    log_format  main  '$remote_addr - $remote_user [$time_local] $request '
                      '"$status" $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';
    access_log <%= @nginx_root %>/access.log main;
    
    passenger_root <%= @passenger_root %>;
    passenger_ruby <%= PlatformInfo.ruby_command %>;
    passenger_default_user <%= CONFIG['default_user'] %>;
    passenger_default_group <%= CONFIG['default_group'] %>;

    <% for server in @servers %>
        server {
            listen <%= @port %>;
            <% server.values.each_pair do |key, value| %>
                <%= key %> <%= value %>;
            <% end %>
            <%= server.extra %>
        }
    <% end %>
    
    # HTTPS server
    #
    #server {
    #    listen       443;
    #    server_name  localhost;

    #    ssl                  on;
    #    ssl_certificate      cert.pem;
    #    ssl_certificate_key  cert.key;

    #    ssl_session_timeout  5m;

    #    ssl_protocols  SSLv2 SSLv3 TLSv1;
    #    ssl_ciphers  ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
    #    ssl_prefer_server_ciphers   on;

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

}
