Saltstack Official Nginx Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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