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