Saltstack Official Nginx Formula
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

109 行
3.8KB

  1. nginx:
  2. install_from_source: True
  3. install_from_ppa: False
  4. use_upstart: True
  5. user_auth_enabled: True
  6. with_luajit: False
  7. with_openresty: True
  8. set_real_ips: # NOTE: to use this, nginx must have http_realip module enabled
  9. from_ips:
  10. - 10.10.10.0/24
  11. real_ip_header: X-Forwarded-For
  12. modules:
  13. headers-more:
  14. source: http://github.com/agentzh/headers-more-nginx-module/tarball/v0.21
  15. source_hash: sha1=dbf914cbf3f7b6cb7e033fa7b7c49e2f8879113b
  16. lookup:
  17. package: nginx
  18. # ========
  19. # nginx.ng
  20. # ========
  21. nginx:
  22. ng:
  23. # These are usually set by grains in map.jinja
  24. lookup:
  25. package: nginx-custom
  26. service: nginx
  27. webuser: www-data
  28. conf_file: /etc/nginx/nginx.conf
  29. vhost_available: /etc/nginx/sites-available
  30. vhost_enabled: /etc/nginx/sites-enabled
  31. vhost_use_symlink: True
  32. # Source compilation is not currently a part of nginx.ng
  33. install_from_source: False
  34. # Install nginx.ng.lookup.package from the PPA repository
  35. install_from_ppa: True
  36. package:
  37. opts: {} # this partially exposes parameters of pkg.installed
  38. service:
  39. enable: True # Whether or not the service will be enabled/running or dead
  40. opts: {} # this partially exposes parameters of service.running / service.dead
  41. server:
  42. opts: {} # this partially exposes file.managed parameters as they relate to the main nginx.conf file
  43. # nginx.conf (main server) declarations
  44. # dictionaries map to blocks {} and lists cause the same declaration to repeat with different values
  45. config:
  46. worker_processes: 4
  47. pid: /run/nginx.pid
  48. events:
  49. worker_connections: 768
  50. http:
  51. sendfile: 'on'
  52. include:
  53. - /etc/nginx/mime.types
  54. - /etc/nginx/conf.d/*.conf
  55. vhosts:
  56. disabled_postfix: .disabled # a postfix appended to files when doing non-symlink disabling
  57. symlink_opts: {} # partially exposes file.symlink params when symlinking enabled sites
  58. rename_opts: {} # partially exposes file.rename params when not symlinking disabled/enabled sites
  59. managed_opts: {} # partially exposes file.managed params for managed vhost files
  60. dir_opts: {} # partially exposes file.directory params for site available/enabled dirs
  61. # vhost declarations
  62. # vhosts will default to being placed in vhost_available
  63. managed:
  64. mysite: # relative pathname of the vhost file
  65. # may be True, False, or None where True is enabled, False, disabled, and None indicates no action
  66. dir: /tmp # an alternate directory (not sites-available) where this vhost may be found
  67. disabled_name: mysite.aint_on # an alternative disabled name to be use when not symlinking
  68. enabled: True
  69. # May be a list of config options or None, if None, no vhost file will be managed/templated
  70. # Take server directives as lists of dictionaries. If the dictionary value is another list of
  71. # dictionaries a block {} will be started with the dictionary key name
  72. config:
  73. - server:
  74. - server_name: localhost
  75. - listen:
  76. - 80
  77. - default_server
  78. - index:
  79. - index.html
  80. - index.htm
  81. - location ~ .htm:
  82. - try_files:
  83. - $uri
  84. - $uri/ =404
  85. - test: something else
  86. # The above outputs:
  87. # server {
  88. # server_name localhost;
  89. # listen 80 default_server;
  90. # index index.html index.htm;
  91. # location ~ .htm {
  92. # try_files $uri $uri/ =404;
  93. # test something else;
  94. # }
  95. # }