Saltstack Official Nginx Formula
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

pillar.example 3.7KB

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