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

135 lines
5.1KB

  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 'stable', 'development' (mainline), 'community', or 'nightly' for each build accordingly ( https://launchpad.net/~nginx )
  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. # This is required for RedHat like distros (Amazon Linux) that don't follow semantic versioning for $releasever
  36. rh_os_releasever: '6'
  37. # Currently it can be used on rhel/centos/suse when installing from repo
  38. gpg_check: True
  39. # Source compilation is not currently a part of nginx.ng
  40. from_source: False
  41. package:
  42. opts: {} # this partially exposes parameters of pkg.installed
  43. service:
  44. enable: True # Whether or not the service will be enabled/running or dead
  45. opts: {} # this partially exposes parameters of service.running / service.dead
  46. server:
  47. opts: {} # this partially exposes file.managed parameters as they relate to the main nginx.conf file
  48. # nginx.conf (main server) declarations
  49. # dictionaries map to blocks {} and lists cause the same declaration to repeat with different values
  50. config:
  51. worker_processes: 4
  52. pid: /run/nginx.pid
  53. events:
  54. worker_connections: 768
  55. http:
  56. sendfile: 'on'
  57. include:
  58. - /etc/nginx/mime.types
  59. - /etc/nginx/conf.d/*.conf
  60. - /etc/nginx/sites-enabled/*
  61. vhosts:
  62. disabled_postfix: .disabled # a postfix appended to files when doing non-symlink disabling
  63. symlink_opts: {} # partially exposes file.symlink params when symlinking enabled sites
  64. rename_opts: {} # partially exposes file.rename params when not symlinking disabled/enabled sites
  65. managed_opts: {} # partially exposes file.managed params for managed vhost files
  66. dir_opts: {} # partially exposes file.directory params for site available/enabled dirs
  67. # vhost declarations
  68. # vhosts will default to being placed in vhost_available
  69. managed:
  70. mysite: # relative pathname of the vhost file
  71. # may be True, False, or None where True is enabled, False, disabled, and None indicates no action
  72. available_dir: /tmp/sites-available # an alternate directory (not sites-available) where this vhost may be found
  73. enabled_dir: /tmp/sites-enabled # an alternate directory (not sites-available) where this vhost may be found
  74. disabled_name: mysite.aint_on # an alternative disabled name to be use when not symlinking
  75. enabled: True
  76. # May be a list of config options or None, if None, no vhost file will be managed/templated
  77. # Take server directives as lists of dictionaries. If the dictionary value is another list of
  78. # dictionaries a block {} will be started with the dictionary key name
  79. config:
  80. - server:
  81. - server_name: localhost
  82. - listen:
  83. - 80
  84. - default_server
  85. - index:
  86. - index.html
  87. - index.htm
  88. - location ~ .htm:
  89. - try_files:
  90. - $uri
  91. - $uri/ =404
  92. - test: something else
  93. # The above outputs:
  94. # server {
  95. # server_name localhost;
  96. # listen 80 default_server;
  97. # index index.html index.htm;
  98. # location ~ .htm {
  99. # try_files $uri $uri/ =404;
  100. # test something else;
  101. # }
  102. # }
  103. # If you're doing SSL termination, you can deploy certificates this way.
  104. # The private one(s) should go in a separate pillar file not in version
  105. # control (or use encrypted pillar data).
  106. certificates:
  107. 'www.example.com':
  108. public_cert: |
  109. -----BEGIN CERTIFICATE-----
  110. (Your Primary SSL certificate: www.example.com.crt)
  111. -----END CERTIFICATE-----
  112. -----BEGIN CERTIFICATE-----
  113. (Your Intermediate certificate: ExampleCA.crt)
  114. -----END CERTIFICATE-----
  115. -----BEGIN CERTIFICATE-----
  116. (Your Root certificate: TrustedRoot.crt)
  117. -----END CERTIFICATE-----
  118. private_key: |
  119. -----BEGIN RSA PRIVATE KEY-----
  120. (Your Private Key: www.example.com.key)
  121. -----END RSA PRIVATE KEY-----