module-nginx/templates/conf.d/nginx.conf.erb

55 lines
1.9 KiB
Text
Raw Normal View History

2011-06-07 00:25:04 +02:00
user <%= scope.lookupvar('nginx::config::nx_daemon_user') %>;
2013-07-17 20:42:57 +02:00
worker_processes <%= @worker_processes %>;
2011-06-07 00:25:04 +02:00
error_log <%= @nginx_error_log %>;
2011-06-07 00:25:04 +02:00
pid <%= scope.lookupvar('nginx::params::nx_pid')%>;
events {
2013-07-17 20:42:57 +02:00
worker_connections <%= @worker_connections -%>;
<% if scope.lookupvar('nginx::params::nx_multi_accept') == 'on' %>multi_accept on;<% end -%>
<% if scope.lookupvar('nginx::params::nx_events_use') %>use <%= scope.lookupvar('nginx::params::nx_events_use')%>;<% end -%>
2011-06-07 00:25:04 +02:00
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log <%= @http_access_log %>;
2011-06-07 00:25:04 +02:00
sendfile <%= scope.lookupvar('nginx::params::nx_sendfile')%>;
2013-07-17 20:42:57 +02:00
server_tokens <%= @server_tokens %>;
<% if scope.lookupvar('nginx::params::nx_tcp_nopush') == 'on' %>tcp_nopush on;<% end %>
2011-06-07 00:25:04 +02:00
types_hash_max_size <%= scope.lookupvar('nginx::params::nx_types_hash_max_size')%>;
types_hash_bucket_size <%= scope.lookupvar('nginx::params::nx_types_hash_bucket_size')%>;
2011-06-07 00:25:04 +02:00
server_names_hash_bucket_size <%= scope.lookupvar('nginx::params::nx_names_hash_bucket_size')%>;
2011-06-07 00:25:04 +02:00
keepalive_timeout <%= scope.lookupvar('nginx::params::nx_keepalive_timeout')%>;
tcp_nodelay <%= scope.lookupvar('nginx::params::nx_tcp_nodelay')%>;
<% if scope.lookupvar('nginx::params::nx_gzip') == 'on' %>
2011-06-07 00:25:04 +02:00
gzip on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
<% end -%>
2013-07-17 20:42:57 +02:00
<% if @proxy_cache_path -%>
proxy_cache_path <%= @proxy_cache_path %> levels=<%= @proxy_cache_levels %> keys_zone=<%= @proxy_cache_keys_zone %> max_size=<%= @proxy_cache_max_size %> inactive=<%= @proxy_cache_inactive %>;
<% end -%>
2011-06-07 00:25:04 +02:00
<% if @http_cfg_append -%><% @http_cfg_append.sort_by{|k,v| k}.each do |key,value| -%>
<%= key %> <%= value %>;
<% end -%>
<% end -%>
2011-06-07 00:25:04 +02:00
include /etc/nginx/conf.d/*.conf;
include <%= scope.lookupvar('nginx::params::nx_conf_dir') %>/sites-enabled/*;
}
<% if scope.lookupvar('nginx::mail') %>
mail {
include /etc/nginx/conf.mail.d/*.conf;
}
<% end -%>