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

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