Skip to content

Instantly share code, notes, and snippets.

@nomasprime
Created May 6, 2016 17:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nomasprime/d4ed3999fb5fbe99a66d11b2ad16190d to your computer and use it in GitHub Desktop.
Save nomasprime/d4ed3999fb5fbe99a66d11b2ad16190d to your computer and use it in GitHub Desktop.
---
nginx:
events_params:
- worker_connections {% if nginx.max_clients is defined %}{{ nginx.max_clients }}{% else %}512{% endif %}
group: www-data
http_params:
- sendfile on
- tcp_nopush on
- tcp_nodelay on
- keepalive_timeout 65
- types_hash_max_size 2048
- access_log /var/log/nginx/access.log
- error_log /var/log/nginx/error.log
user: www-data
worker_processes: "{% if ansible_processor_vcpus is defined %}{{ ansible_processor_vcpus }}{% else %}auto{% endif %}"
#{{ ansible_managed }}
user {{ nginx.user }} {{ nginx.group }};
worker_processes {{ nginx.worker_processes }};
pid /run/nginx.pid
events {
{% for events_param in nginx.events_params %}
{{ events_param }};
{% endfor %}
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
{% for http_param in nginx.http_params %}
{{ http_param }};
{% endfor %}
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment