{"id":20347515,"url":"https://github.com/evilmartians/chef-nginx","last_synced_at":"2025-04-12T00:56:23.702Z","repository":{"id":6035338,"uuid":"7259608","full_name":"evilmartians/chef-nginx","owner":"evilmartians","description":"Chef Nginx recipes","archived":false,"fork":false,"pushed_at":"2019-06-03T13:30:40.000Z","size":121,"stargazers_count":35,"open_issues_count":1,"forks_count":4,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-12T00:56:15.861Z","etag":null,"topics":["chef","chef-nginx","cookbooks","nginx"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/evilmartians.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-12-20T15:13:08.000Z","updated_at":"2024-01-24T13:18:25.000Z","dependencies_parsed_at":"2022-09-12T14:21:55.883Z","dependency_job_id":null,"html_url":"https://github.com/evilmartians/chef-nginx","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evilmartians%2Fchef-nginx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evilmartians%2Fchef-nginx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evilmartians%2Fchef-nginx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evilmartians%2Fchef-nginx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evilmartians","download_url":"https://codeload.github.com/evilmartians/chef-nginx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248501878,"owners_count":21114683,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chef","chef-nginx","cookbooks","nginx"],"created_at":"2024-11-14T22:16:59.657Z","updated_at":"2025-04-12T00:56:23.677Z","avatar_url":"https://github.com/evilmartians.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/evilmartians/chef-nginx.svg?branch=master)](https://travis-ci.org/evilmartians/chef-nginx)\n\n# Description\n\nInstalls Nginx from package, sets up some default configuration and defines LWRP supposed to be used inside your own cookbooks, which you use to manage your infrastructure.\n\n# Requirements\n\n## Cookbooks\n\nAt the moment this cookbook doesn't depend on other cookbooks but it may change in the future.\n\n## Platform\n\nThe cookbook has been tested to work on `Ubuntu 14.04`, `Ubuntu 16.04`, `Debian 8` and `Debian 9`\n\nI suppose it should also work for CenOS/RHEL but no tests have been conducted yet.\n\n## Chef version\n\nChef version \u003e= `13` has to be used.\n\n\u003e Сhef 12 is reaching its EOL in April 2018 and will be removed from [downloads.chef.io](https://downloads.chef.io) so it doesn't make sense to continue its support, so I'm dropping Chef 12 support starting from version 3.0.0 of this cookbook in favor of Chef 13.\n\n## Attributes\n\nDefaults that are used to configure nginx. If you want to change one of this parameters in nginx consider using provided LWRP and definitions.\n\n* `node['nginx']['config']['conf_dir']` - Base nginx config directory. Default `/etc/nginx`.\n* `node['nginx']['config']['log_dir']` - Directory for nginx log files. Default `/var/log/nginx`.\n* `node['nginx']['config']['user']` - Default user that nginx will use to run worker processes. Default: `www-data`.\n* `node['nginx']['config']['worker_processes']` - Number of nginx workers. Default `cpu['total']`.\n* `node['nginx']['config']['worker_connections'] - Number of simultaneous connections that one worker can serve. Default `8192`.\n* `node['nginx']['config']['worker_rlimit_nofile']` - Specifies the value for maximum file descriptors that can be opened by one worker process. Default `8192`.\n* `node['nginx']['config']['pid']` - Path to Nginx pid file. Default: `/var/run/nginx.pid`\n* `node['nginx']['config']['mainconfig_include']` - Include files into the main context of nginx.conf. Default: `nil`\n* `node['nginx']['config']['error_log']` - Path to a default error log file. Default: `/var/log/nginx/error.log`\n\n\n# Recipes\n\nThis cookbook provides only one recipe:\n\n## default.rb\n\nThis default recipe will make some basic steps:\n\n* installs Nginx from the package that is provided by your OS's package manager (\"pin\" the desired version using another cookbook);\n* creates all directories for configuration, directory for log files, etc;\n* creates default `nginx.conf` file and associated files;\n* configures log rotation for Nginx;\n* enables and starts Nginx service;\n* runs resource that removes Nginx configuration files for sites, which are not defined by this cookbook's LWRP.\n\n# Usage\n\n## Wrapper-cookbook way\n\nThis cookbook has been designed to provide **LWRP** for your own infrastructure recipes. First of all, we should make our infrastructure cookbook to load this one.\n* Do it by adding the line `depends nginx_lwrp` to your cookbook's metadata.rb.\n* To make all default preparations for using Nginx invoke `include_recipe \"nginx_lwrp\"` inside your designated recipe.\n* Now feel free to use all available LWRP provided by this cookbook.\n\n## Roles-based way\n\nAnother way to use this cookbook is just to add `recipe[nginx_lwrp]` to your **run_list** before your recipe, which is resonsible for your infrastructure.\n\nI personally prefer the first way because if you stick to it you'll eventually get complete and explicit \"documentation\" for your specific server installation. But in any case, you'll get Nginx installed, nginx.conf configured from the default template we provide, **LWRP** defined and ready to use.\n\n## Official Nginx repo or default distro package\n\nIf you would like to use nginx package from official nginx repo, then just add `recipe[nginx_lwrp::official-repo]` or `include_recipe 'nginx_lwrp::official-repo'` before `nginx_lwrp` recipe invokation. Other wise default nginx package would be used from distro repository.\n\n## LWRP\n\n### nginx_site\n\nThis resource manages your Nginx sites configuraions.\n\n#### Actions\n\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth\u003eAction\u003c/th\u003e\n      \u003cth\u003eDescription\u003c/th\u003e\n      \u003cth\u003eDefault\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003ecreate\u003c/td\u003e\n      \u003ctd\u003e\n        Creates site configuration file inside \"sites-available\" directory, but doesn't enable it.\n      \u003c/td\u003e\n      \u003ctd\u003e \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eenable\u003c/td\u003e\n      \u003ctd\u003e\n        Creates site configuration file inside \"sites-available\" directory, enables it (puts a symlink to it into \"sites-enabled\" directory)\n      \u003c/td\u003e\n      \u003ctd\u003eYes\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n     \u003ctd\u003edisable\u003c/td\u003e\n      \u003ctd\u003e\n        Ensures that site configuration file is disabled.\n      \u003c/td\u003e\n      \u003ctd\u003e \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003edelete\u003c/td\u003e\n      \u003ctd\u003e\n        Disables and deletes site configuration file.\n      \u003c/td\u003e\n      \u003ctd\u003e \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n#### Attributes\n\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth\u003eAttribute\u003c/th\u003e\n      \u003cth\u003eDescription\u003c/th\u003e\n      \u003cth\u003eDefault Value\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003ename\u003c/td\u003e\n      \u003ctd\u003e\u003cb\u003eName attribute:\u003c/b\u003e the name of the site's configuration file.\u003c/td\u003e\n      \u003ctd\u003e\u003ccode\u003enil\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003etemplate\u003c/td\u003e\n      \u003ctd\u003eDefines what erb template file from the cookbook that invokes this resource we should use.\u003c/td\u003e\n      \u003ctd\u003e\u003ccode\u003ename\u003c/code\u003e.conf.erb\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003evariables\u003c/td\u003e\n      \u003ctd\u003eVariables to be used in the template.\u003c/td\u003e\n      \u003ctd\u003e\u003ccode\u003eHash.new\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n#### Examples\n\n\n\n```ruby\n# We want to use \"example.com.conf.erb\" template file, do not want to pass any variables.\nnginx_site 'example.com'\n\n# Using custom-named template file and passing some variables, which can be used inside the template.\nnginx_site 'forum.example.com' do\n  action :enable\n  template 'forum-nginx.erb'\n  variables(\n    listen_ip: '10.0.0.10',\n    remote_ips: [ '10.0.0.2', '10.0.0.4' ]\n  )\nend\n\n# Making sure that old site's configuration is disabled even if somebody has enabled it by hands.\nnginx_site 'old.example.com' do\n  action :disable\nend\n```\n\n### nginx\\_stream\n\nResource is completle similar to `nginx_site` except it is made to manage stream section includes.\n\n#### Actions\n\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth\u003eAction\u003c/th\u003e\n      \u003cth\u003eDescription\u003c/th\u003e\n      \u003cth\u003eDefault\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003ecreate\u003c/td\u003e\n      \u003ctd\u003e\n        Creates site configuration file inside \"streams-available\" directory, but doesn't enable it.\n      \u003c/td\u003e\n      \u003ctd\u003e \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eenable\u003c/td\u003e\n      \u003ctd\u003e\n        Creates site configuration file inside \"streams-available\" directory, enables it (puts a symlink to it into \"streams-enabled\" directory)\n      \u003c/td\u003e\n      \u003ctd\u003eYes\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n     \u003ctd\u003edisable\u003c/td\u003e\n      \u003ctd\u003e\n        Ensures that site configuration file is disabled.\n      \u003c/td\u003e\n      \u003ctd\u003e \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003edelete\u003c/td\u003e\n      \u003ctd\u003e\n        Disables and deletes site configuration file.\n      \u003c/td\u003e\n      \u003ctd\u003e \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n#### Attributes\n\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth\u003eAttribute\u003c/th\u003e\n      \u003cth\u003eDescription\u003c/th\u003e\n      \u003cth\u003eDefault Value\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003ename\u003c/td\u003e\n      \u003ctd\u003e\u003cb\u003eName attribute:\u003c/b\u003e the name of the stream's configuration file.\u003c/td\u003e\n      \u003ctd\u003e\u003ccode\u003enil\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003etemplate\u003c/td\u003e\n      \u003ctd\u003eDefines what erb template file from the cookbook that invokes this resource we should use.\u003c/td\u003e\n      \u003ctd\u003e\u003ccode\u003ename\u003c/code\u003e.conf.erb\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003evariables\u003c/td\u003e\n      \u003ctd\u003eVariables to be used in the template.\u003c/td\u003e\n      \u003ctd\u003e\u003ccode\u003eHash.new\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n#### Examples\n\n```ruby\n# We want to use \"example.com.conf.erb\" template file, do not want to pass any variables.\nnginx_stream 'stream-01'\n\n# Using custom-named template file and passing some variables, which can be used inside the template.\nnginx_stream 'tcp-stream' do\n  action :enable\n  template 'nginx-stream.erb'\n  variables(\n    listen_ip: '10.0.0.10',\n    remote_ips: '10.0.0.2'\n  )\nend\n\n# Making sure that old site's configuration is disabled even if somebody has enabled it by hands.\nnginx_site 'old-stream' do\n  action :disable\nend\n```\n\n### nginx\\_mainconfig\n\nThis resource is deprecated right now, use attributes instead.\n\n```ruby\nnode.default['nginx']['config']['OPTION'] = 'VALUE'\n```\n\n#### List of allowed attributes\n\n* [accept_mutex](http://nginx.org/en/docs/ngx_core_module.html#accept_mutex)\n* [accept_mutex_delay](http://nginx.org/en/docs/ngx_core_module.html#accept_mutex_delay)\n* [daemon](http://nginx.org/en/docs/ngx_core_module.html#daemon)\n* [debug_points](http://nginx.org/en/docs/ngx_core_module.html#debug_points)\n* [error_log](http://nginx.org/en/docs/ngx_core_module.html#error_log)\n* [lock_file](http://nginx.org/en/docs/ngx_core_module.html#lock_file)\n* [master_process](http://nginx.org/en/docs/ngx_core_module.html#master_process)\n* [multi_accept](http://nginx.org/en/docs/ngx_core_module.html#multi_accept)\n* [pcre_jit](http://nginx.org/en/docs/ngx_core_module.html#pcre_jit)\n* [pid](http://nginx.org/en/docs/ngx_core_module.html#pid)\n* [server_names_hash_bucket_size](http://nginx.org/en/docs/http/ngx_http_core_module.html#server_names_hash_bucket_size)\n* [server_names_hash_max_size](http://nginx.org/en/docs/http/ngx_http_core_module.html#server_names_hash_max_size)\n* [ssl_engine](http://nginx.org/en/docs/ngx_core_module.html#ssl_engine)\n* [timer_resolution](http://nginx.org/en/docs/ngx_core_module.html#timer_resolution)\n* [types_hash_bucket_size](http://nginx.org/en/docs/http/ngx_http_core_module.html#types_hash_bucket_size)\n* [use](http://nginx.org/en/docs/ngx_core_module.html#use)\n* [user](http://nginx.org/en/docs/ngx_core_module.html#user)\n* [variables_hash_bucket_size](http://nginx.org/en/docs/http/ngx_http_core_module.html#variables_hash_bucket_size)\n* [variables_hash_max_size](http://nginx.org/en/docs/http/ngx_http_core_module.html#variables_hash_max_size)\n* [worker_connections](http://nginx.org/en/docs/ngx_core_module.html#worker_connections)\n* [worker_aio_requests](http://nginx.org/en/docs/ngx_core_module.html#worker_aio_requests)\n* [worker_cpu_affinity](http://nginx.org/en/docs/ngx_core_module.html#worker_cpu_affinity)\n* [worker_priority](http://nginx.org/en/docs/ngx_core_module.html#worker_priority)\n* [worker_processes](http://nginx.org/en/docs/ngx_core_module.html#worker_processes)\n* [worker_rlimit_core](http://nginx.org/en/docs/ngx_core_module.html#worker_rlimit_core)\n* [worker_rlimit_nofile](http://nginx.org/en/docs/ngx_core_module.html#worker_rlimit_nofile)\n* [worker_rlimit_sigpending](http://nginx.org/en/docs/ngx_core_module.html#worker_rlimit_sigpending)\n* [working_directory](http://nginx.org/en/docs/ngx_core_module.html#working_directory)\n\nThere are also attributes that can accept either a string or an array of strings:\n\n* [env](http://nginx.org/en/docs/ngx_core_module.html#env)\n* [load_module](http://nginx.org/en/docs/ngx_core_module.html#load_module)\n* [debug_connection](http://nginx.org/en/docs/ngx_core_module.html#debug_connection)\n\n## Small handy templates\n\nAs mentioned in the previous paragraph - main nginx config file acceps only limited set of options. But we always do some tuning like enabling compression, etc. I've created two small templates for a kind of configuration I usually use. It's a bit ugly and it's atemorary solution but may become usefull if you want some standart and clean confguration fast.\n\n**Invoke each of these templates only once otherwise you'll have invalid nginx config.**\n\n### gzip.conf.erb\n\nDefaults to:\n```\ngzip on;\ngzip_http_version 1.0;\ngzip_comp_level 4;\ngzip_proxied any;\ngzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript application/json;\ngzip_disable msie6;\ngzip_vary off;\n```\n\nHow to use:\n\n```ruby\n# Use its default parameters.\nnginx_site '00-gzip' do\n  cookbook 'nginx_lwrp'\n  template 'gzip.conf.erb'\nend\n\n# Or you can fine tune it.\nnginx_site '01-gzip' do\n  cookbook 'nginx_lwrp'\n  template 'gzip.conf.erb'\n  variables(\n    enabled: true,\n    http_version: '1.0',\n    comp_version: 4,\n    proxied: 'any',\n    types: %w( text/plain text/css ),\n    vary: 'off'\n  )\nend\n```\n\n### some-handy-defaults.conf.erb\n\nDefaults to:\n\n```\nsendfile on;\ntcp_nopush on;\ntcp_nodelay on;\nserver_tokens off;\nreset_timedout_connection off;\n\nkeepalive_timeout 65;\n```\n\nHow to use:\n\n```ruby\n# Use its default parameters.\nnginx_site '02-some-handy-defaults' do\n  cookbook 'nginx_lwrp'\n  template 'some-handy-defaults.conf.erb'\nend\n\n# Or you can fine tune it.\nnginx_site '03-some-handy-defaults' do\n  cookbook 'nginx_lwrp'\n  template 'some-handy-defaults.conf.erb'\n  variables(\n    sendfile: 'on',\n    tcp_nopush: 'on',\n    tcp_nodelay: 'on',\n    server_tokens: 'off',\n    reset_timedout_connection: 'off',\n    keepalive_timeout: 65\n  )\nend\n```\n\n### nginx\\_logrotate\n\nThis resource and definition are deprecated right now. There are new attributes for log rotation configuration now: \n\n```ruby\nnode.default['nginx']['logrotate']['OPTION'] = 'VALUE'\n```\n\nDefault logrotate configuration:\n\n```\n/var/log/nginx/*.log {\n    daily\n    missingok\n    notifempty\n    rotate 7\n    compress\n    create 640 root adm\n    delaycompress\n    sharedscripts\n    postrotate\n      test -f /var/run/nginx.pid \u0026\u0026 kill -USR1 \"$(cat /var/run/nginx.pid)\"\n    endscript\n}\n```\n\n#### Attributes\n\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth\u003eAttribute\u003c/th\u003e\n      \u003cth\u003eDescription\u003c/th\u003e\n      \u003cth\u003eDefault Value\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003elogs\u003c/td\u003e\n      \u003ctd\u003eLog files to be rotated. Wildcards are allowed.\u003c/td\u003e\n      \u003ctd\u003e/var/log/nginx/*.log\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003ehow_often\u003c/td\u003e\n      \u003ctd\u003eDefines how often we should rotate logs. Allowed values are \u003ci\u003edaily\u003c/i\u003e, \u003ci\u003eweekly\u003c/i\u003e, \u003ci\u003emonthly\u003c/i\u003e.\u003c/td\u003e\n      \u003ctd\u003edaily\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003ecopytruncate\u003c/td\u003e\n      \u003ctd\u003eIf true truncate the original log file to zero size in place after creating a copy, instead of moving the old log file and optionally creating a new one.\u003c/td\u003e\n      \u003ctd\u003e\u003ccode\u003efalse\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003edateext\u003c/td\u003e\n      \u003ctd\u003eIf true archive  old  versions  of log files adding a daily extension like YYYYMMDD instead of simply adding a number. The extension may be configured using the dateformat option.\u003c/td\u003e\n      \u003ctd\u003e\u003ccode\u003efalse\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003edelaycompress\u003c/td\u003e\n      \u003ctd\u003eIf true postpone compression of the previous log file to the next rotation cycle.  This only has effect when used in combination  with  compress. It can be used when some program cannot be told to close its logfile and thus might continue writing to the previous log file for some time.\u003c/td\u003e\n      \u003ctd\u003e\u003ccode\u003etrue\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003erotate\u003c/td\u003e\n      \u003ctd\u003eLog files are rotated this number of times before being removed.\u003c/td\u003e\n      \u003ctd\u003e7\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003euser\u003c/td\u003e\n      \u003ctd\u003eSpecifies the user name who will own the log file.\u003c/td\u003e\n      \u003ctd\u003eroot\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003egroup\u003c/td\u003e\n      \u003ctd\u003eSpecifies the group the log file will belong to.\u003c/td\u003e\n      \u003ctd\u003eadm\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003emode\u003c/td\u003e\n      \u003ctd\u003eSpecifies the mode for the log file in octal.\u003c/td\u003e\n      \u003ctd\u003e640\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003epidfile\u003c/td\u003e\n      \u003ctd\u003ePath to file that contains pid nuber of Nginx master process. If copytruncate is set to false we should send USR1 signal to that Nginx process to make it reopen log files after log rotation.\u003c/td\u003e\n      \u003ctd\u003e/var/run/nginx.pid\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n### nginx\\_disable\\_cleanup\n\nThis resource is deprecated right now.\n\n### nginx\\_logrotate\\_template\n\nThis resource is deprecated right now.\n\n### nginx\\_cleanup\n\nThis definitions is deprecated right now. Use attribute to disable cleanup:\n\n```ruby\nnode.default['nginx']['enable_cleanup'] = false\n```\n\n## Sponsor\n\n[![Sponsored by Evil Martians](https://evilmartians.com/badges/sponsored-by-evil-martians@2x.png)](https://evilmartians.com)\n\n# License and Author\n\nKirill Kouznetsov (agon.smith@gmail.com)\n\nCopyright (C) 2012-2018 Kirill Kouznetsov\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevilmartians%2Fchef-nginx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevilmartians%2Fchef-nginx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevilmartians%2Fchef-nginx/lists"}