2015-07-15 17:14:39 +07:00
|
|
|
---
|
2015-07-15 20:18:51 +07:00
|
|
|
|
|
|
|
nginx_apt_package: nginx-full
|
2016-01-11 21:16:24 +07:00
|
|
|
nginx_backports: false
|
2015-07-15 20:18:51 +07:00
|
|
|
|
|
|
|
#
|
|
|
|
# Nginx shared variables
|
|
|
|
#
|
2015-07-30 18:02:21 +07:00
|
|
|
nginx_root: "/srv/www"
|
2015-07-15 20:18:51 +07:00
|
|
|
nginx_log_dir: '/var/log/nginx'
|
2016-01-12 00:20:42 +07:00
|
|
|
nginx_resolver_hosts: ['8.8.8.8', '8.8.4.4']
|
|
|
|
nginx_resolver_valid: '300s'
|
|
|
|
nginx_resolver_timeout: '5s'
|
2015-07-15 20:18:51 +07:00
|
|
|
nginx_error_log_level: 'warn' # http://nginx.org/en/docs/ngx_core_module.html#error_log
|
2016-01-12 21:10:43 +07:00
|
|
|
nginx_auto_config_httpv2: true
|
2016-01-21 23:08:01 +07:00
|
|
|
nginx_default_vhost: null
|
|
|
|
nginx_default_vhost_ssl: null
|
2015-07-15 20:18:51 +07:00
|
|
|
|
2016-01-12 00:20:42 +07:00
|
|
|
#
|
|
|
|
# Nginx directories
|
|
|
|
#
|
2016-03-05 21:07:39 +07:00
|
|
|
nginx_htpasswd_dir: '{{ nginx_etc_dir}}/htpasswd'
|
|
|
|
nginx_ssl_dir: '{{ nginx_etc_dir}}/ssl'
|
|
|
|
nginx_helper_dir: '{{ nginx_etc_dir}}/helper'
|
2015-07-15 20:18:51 +07:00
|
|
|
|
|
|
|
#
|
|
|
|
# Load upstream
|
|
|
|
#
|
|
|
|
|
|
|
|
# PHP
|
2015-07-16 21:26:40 +07:00
|
|
|
nginx_php: false
|
|
|
|
nginx_php_sockets:
|
2015-07-30 21:46:17 +07:00
|
|
|
- unix_socket: "/var/run/php5-fpm.sock"
|
2015-12-01 22:35:56 +07:00
|
|
|
nginx_upstreams: []
|
2015-07-15 20:18:51 +07:00
|
|
|
|
|
|
|
#
|
|
|
|
# Nginx configuration
|
|
|
|
#
|
|
|
|
nginx_user: 'www-data'
|
|
|
|
nginx_worker_processes: '{{ ansible_processor_vcpus }}'
|
|
|
|
|
2015-12-09 22:46:50 +07:00
|
|
|
#
|
|
|
|
# Nginx events
|
|
|
|
#
|
|
|
|
nginx_events_worker_connections: '512'
|
|
|
|
nginx_events_multi_accept: 'on'
|
2015-07-15 20:18:51 +07:00
|
|
|
|
|
|
|
#
|
|
|
|
# Nginx HTTP
|
|
|
|
#
|
2015-12-09 22:46:50 +07:00
|
|
|
nginx_http_types_hash_max_size: 2048
|
|
|
|
nginx_http_default_type: 'application/octet-stream'
|
|
|
|
nginx_http_access_log: 'off'
|
|
|
|
nginx_http_error_log: 'off'
|
|
|
|
nginx_http_client_body_buffer_size: '1M'
|
|
|
|
nginx_http_client_header_buffer_size: '1M'
|
|
|
|
nginx_http_client_max_body_size: '10M'
|
|
|
|
nginx_http_large_client_header_buffers: '8 8k'
|
|
|
|
nginx_http_client_body_timeout: '60'
|
|
|
|
nginx_http_client_header_timeout: '60'
|
|
|
|
nginx_http_keepalive_timeout: '30 30'
|
|
|
|
nginx_http_send_timeout: '120'
|
|
|
|
nginx_http_ignore_invalid_headers: 'on'
|
|
|
|
nginx_http_keepalive_requests: '100'
|
|
|
|
nginx_http_recursive_error_pages: 'on'
|
|
|
|
nginx_http_sendfile: 'on'
|
|
|
|
nginx_http_server_name_in_redirect: 'off'
|
|
|
|
nginx_http_server_tokens: 'off'
|
|
|
|
nginx_http_tcp_nodelay: 'on'
|
|
|
|
nginx_http_tcp_nopush: 'on'
|
|
|
|
nginx_http_reset_timedout_connection: 'on'
|
|
|
|
nginx_http_gzip: 'on'
|
|
|
|
nginx_http_gzip_buffers: '16 8k'
|
|
|
|
nginx_http_gzip_comp_level: '9'
|
|
|
|
nginx_http_gzip_http_version: '1.0'
|
|
|
|
nginx_http_gzip_min_length: '0'
|
|
|
|
nginx_http_gzip_types: 'text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml'
|
|
|
|
nginx_http_gzip_vary: 'on'
|
|
|
|
nginx_http_gzip_disable: '"msie6"'
|
2015-07-15 20:18:51 +07:00
|
|
|
|
2015-12-09 23:06:59 +07:00
|
|
|
#
|
2016-01-26 17:19:51 +07:00
|
|
|
# Custom global configuration
|
2015-12-09 23:06:59 +07:00
|
|
|
#
|
2016-01-26 17:19:51 +07:00
|
|
|
nginx_custom_http: []
|
2015-12-09 23:06:59 +07:00
|
|
|
|
2015-12-01 22:35:56 +07:00
|
|
|
#
|
|
|
|
# Vhosts
|
|
|
|
#
|
2015-07-15 20:18:51 +07:00
|
|
|
nginx_vhosts: []
|
2015-12-03 22:32:08 +07:00
|
|
|
|
|
|
|
#
|
|
|
|
# htpasswd
|
|
|
|
#
|
|
|
|
nginx_htpasswd: []
|
2016-01-12 00:20:42 +07:00
|
|
|
|
|
|
|
#
|
|
|
|
# SSL pairs
|
|
|
|
#
|
|
|
|
nginx_ssl_pairs: []
|
2016-01-12 17:16:41 +07:00
|
|
|
|
|
|
|
#
|
2016-01-12 18:14:36 +07:00
|
|
|
# Diffie-Hellman
|
2016-01-12 17:16:41 +07:00
|
|
|
#
|
|
|
|
nginx_dh: null
|
|
|
|
nginx_dh_path: '{{ nginx_ssl_dir }}/dhparam.pem'
|
|
|
|
nginx_dh_length: 2048
|