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 %>;
|
2014-03-12 18:17:41 +01:00
|
|
|
worker_rlimit_nofile <%= @worker_rlimit_nofile %>;
|
2011-06-07 00:25:04 +02:00
|
|
|
|
2013-08-08 03:27:13 +02:00
|
|
|
error_log <%= @nginx_error_log %>;
|
2014-05-15 23:55:24 +02:00
|
|
|
<% if scope.lookupvar('nginx::params::nx_pid') != false %>pid <%= scope.lookupvar('nginx::params::nx_pid')%>;<% end -%>
|
2011-06-07 00:25:04 +02:00
|
|
|
|
|
|
|
events {
|
2014-05-31 16:06:23 +02:00
|
|
|
worker_connections <%= @worker_connections -%>;
|
|
|
|
<% if @multi_accept == 'on' -%>
|
|
|
|
multi_accept on;
|
|
|
|
<% end -%>
|
|
|
|
<% if @events_use -%>
|
|
|
|
use <%= @events_use %>;
|
|
|
|
<% end -%>
|
2011-06-07 00:25:04 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
http {
|
2014-03-20 16:40:40 +01:00
|
|
|
include <%= scope.lookupvar('nginx::params::nx_conf_dir') %>/mime.types;
|
2011-06-07 00:25:04 +02:00
|
|
|
default_type application/octet-stream;
|
|
|
|
|
2013-08-08 03:27:13 +02:00
|
|
|
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 %>;
|
2011-06-07 00:25:04 +02:00
|
|
|
|
2013-05-14 04:46:06 +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
|
|
|
|
2014-01-10 04:42:16 +01:00
|
|
|
server_names_hash_bucket_size <%= @names_hash_bucket_size %>;
|
|
|
|
server_names_hash_max_size <%= @names_hash_max_size %>;
|
2013-06-20 16:48:52 +02:00
|
|
|
|
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')%>;
|
|
|
|
|
2014-01-17 10:29:56 +01:00
|
|
|
<% if @gzip == 'on' %>
|
2011-06-07 00:25:04 +02:00
|
|
|
gzip on;
|
|
|
|
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
|
2013-07-21 17:40:29 +02:00
|
|
|
<% end -%>
|
2013-03-27 19:13:52 +01:00
|
|
|
|
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 %>;
|
2013-03-27 19:13:52 +01:00
|
|
|
<% end -%>
|
2011-06-07 00:25:04 +02:00
|
|
|
|
2014-04-26 16:34:29 +02:00
|
|
|
<% if @fastcgi_cache_path -%>
|
2014-04-27 15:49:45 +02:00
|
|
|
fastcgi_cache_path <%= @fastcgi_cache_path %> levels=<%= @fastcgi_cache_levels %> keys_zone=<%= @fastcgi_cache_keys_zone %> max_size=<%= @fastcgi_cache_max_size %> inactive=<%= @fastcgi_cache_inactive %>;
|
|
|
|
<% end -%>
|
|
|
|
<% if @fastcgi_cache_key -%>
|
|
|
|
fastcgi_cache_key <%= @fastcgi_cache_key %>;
|
|
|
|
<% end -%>
|
|
|
|
<% if @fastcgi_cache_use_stale -%>
|
|
|
|
fastcgi_cache_use_stale <%= @fastcgi_cache_use_stale %>;
|
2014-04-26 16:34:29 +02:00
|
|
|
<% end -%>
|
|
|
|
|
2013-07-21 02:12:18 +02:00
|
|
|
<% if @http_cfg_append -%><% @http_cfg_append.sort_by{|k,v| k}.each do |key,value| -%>
|
|
|
|
<%= key %> <%= value %>;
|
|
|
|
<% end -%>
|
|
|
|
<% end -%>
|
|
|
|
|
2014-03-20 16:40:40 +01:00
|
|
|
include <%= scope.lookupvar('nginx::params::nx_conf_dir') %>/conf.d/*.conf;
|
2013-12-01 01:51:31 +01:00
|
|
|
include <%= scope.lookupvar('nginx::params::nx_conf_dir') %>/sites-enabled/*;
|
2013-07-21 02:12:18 +02:00
|
|
|
|
2012-10-01 21:00:18 +02:00
|
|
|
}
|
add support for mail module
See http://wiki.nginx.org/Modules#Mail_modules
Sample Usage:
nginx::resource::mailhost { 'domain1.example':
ensure => present,
auth_http => 'server2.example/cgi-bin/auth',
protocol => 'smtp',
listen_port => 587,
ssl_port => 465,
starttls => 'only',
xclient => 'off',
ssl => 'true',
ssl_cert => '/tmp/server.crt',
ssl_key => '/tmp/server.pem',
}
2013-03-11 14:05:00 +01:00
|
|
|
<% if scope.lookupvar('nginx::mail') %>
|
|
|
|
mail {
|
2014-03-24 22:07:38 +01:00
|
|
|
include <%= scope.lookupvar('nginx::params::nx_conf_dir') %>/conf.mail.d/*.conf;
|
add support for mail module
See http://wiki.nginx.org/Modules#Mail_modules
Sample Usage:
nginx::resource::mailhost { 'domain1.example':
ensure => present,
auth_http => 'server2.example/cgi-bin/auth',
protocol => 'smtp',
listen_port => 587,
ssl_port => 465,
starttls => 'only',
xclient => 'off',
ssl => 'true',
ssl_cert => '/tmp/server.crt',
ssl_key => '/tmp/server.pem',
}
2013-03-11 14:05:00 +01:00
|
|
|
}
|
|
|
|
<% end -%>
|