Saltstack Official Nginx Formula
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

97 lines
3.4KB

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