Sha256: 993902ca546ab569ca4e2a2a9cecc06f3f5475142ad97daccf41c4e815064908

Contents?: true

Size: 1.97 KB

Versions: 5

Compression:

Stored size: 1.97 KB

Contents

<%
  @path = "/etc/nginx/nginx.conf"
  @post = "mkdir -p /mnt/nginx/logs"
%>

user <%= rubber_env.app_user %>;
worker_processes 4;
worker_rlimit_nofile 10240;

pid /var/run/nginx.pid;

events
{
  worker_connections 8192;
}

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

  sendfile          on;
  tcp_nopush        on;
  tcp_nodelay       off;

  gzip              on;
  gzip_http_version 1.0;
  gzip_comp_level   2;
  gzip_proxied      any;
  
  gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript image/x-icon image/x-ms-bmp image/svg+xml application/x-font-ttf font/opentype application/vnd.ms-fontobject;

  # make sure gzip does not lose large gzipped js or css files
  # see http://blog.leetsoft.com/2007/7/25/nginx-gzip-ssl
  gzip_buffers 16 8k;

  # configure log format like to Apache's "combined" log format
  log_format        main
                      '$remote_addr - $remote_user [$time_local] '
                      '"$request" $status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_cookie"';

  # default log files
  error_log         /mnt/nginx/logs/error.log notice;
  access_log        /mnt/nginx/logs/access.log main;

	passenger_root <%= rubber_env.passenger_root %>;
	passenger_ruby <%= rubber_env.passenger_ruby %>;

	passenger_max_pool_size <%= rubber_env.max_app_connections %>;
	passenger_min_instances <%= rubber_env.max_app_connections %>;
	passenger_max_instances_per_app 0;
	passenger_pool_idle_time 0;
	rails_framework_spawner_idle_time 0;
	rails_app_spawner_idle_time 0;
  rails_env <%= Rubber.env %>;
	passenger_friendly_error_pages <%= Rubber.env == 'production' ? 'off' : 'on' %>;
	
	passenger_user <%= rubber_env.app_user %>;
	
  include /etc/nginx/rubber/passenger_nginx.conf;
  <% if rubber_instances[rubber_env.host].role_names.include?('web_tools') %> 
    include /etc/nginx/rubber/tools.conf;
  <% end %>
}

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rubber-2.2.4 templates/passenger_nginx/config/rubber/role/passenger_nginx/nginx.conf
rubber-2.2.3 templates/passenger_nginx/config/rubber/role/passenger_nginx/nginx.conf
rubber-2.2.2 templates/passenger_nginx/config/rubber/role/passenger_nginx/nginx.conf
rubber-2.2.1 templates/passenger_nginx/config/rubber/role/passenger_nginx/nginx.conf
rubber-2.2.0 templates/passenger_nginx/config/rubber/role/passenger_nginx/nginx.conf