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

11 лет назад
11 лет назад
11 лет назад
11 лет назад
11 лет назад
11 лет назад
11 лет назад
11 лет назад
11 лет назад
11 лет назад
11 лет назад
11 лет назад
11 лет назад
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. ======
  2. apache
  3. ======
  4. Formulas to set up and configure the Apache HTTP server.
  5. .. note::
  6. See the full `Salt Formulas installation and usage instructions
  7. <http://docs.saltstack.com/topics/conventions/formulas.html>`_.
  8. Available states
  9. ================
  10. .. contents::
  11. :local:
  12. ``apache``
  13. ----------
  14. Installs the Apache package and starts the service.
  15. ``apache.mod_wsgi``
  16. -------------------
  17. Installs the mod_wsgi package and enables the Apache module.
  18. ``apache.vhost.standard``
  19. -------------------------
  20. Configures Apache name-based virtual hosts using data from Pillar.
  21. Example Pillar:
  22. .. code:: yaml
  23. apache:
  24. sites:
  25. # Default values below are used unless disabled by setting to 'None'.
  26. example.com: # must be unique; used as an ID declaration in Salt; also passed to the template context as {{ id }}
  27. template_file: salt://apache/vhosts/standard.tmpl
  28. template_engine: jinja
  29. interface: '*'
  30. port: '80'
  31. ServerName: {{ id }} # uses the unique ID above unless specified
  32. ServerAlias: www.{{ id }}
  33. ServerAdmin: webmaster@{{ id }}
  34. LogLevel: warn
  35. ErrorLog: {{ logdir }}/{{ id }}-error.log # E.g.: /var/log/apache2/example.com-error.log
  36. CustomLog: {{ logdir }}/{{ id }}-access.log # E.g.: /var/log/apache2/example.com-access.log
  37. DocumentRoot: {{ wwwdir }}/{{ id }} # E.g., /var/www/example.com
  38. Directory:
  39. {{ wwwdir }}/{{ id }}: # E.g.: /var/www/example.com:
  40. Options: -Indexes FollowSymLinks
  41. Order: allow,deny
  42. Allow: from all
  43. AllowOverride: All
  44. Formula_Append: |
  45. Additional config as a
  46. multi-line string here
  47. Formula_Append: |
  48. Additional config as a
  49. multi-line string here
  50. example.net:
  51. template_file: salt://apache/vhosts/minimal.tmpl
  52. ``apache.debian_full``
  53. ----------------------
  54. Installs and configures Apache on Debian and Ubuntu systems.
  55. These states are ordered using the ``order`` declaration. Different stages
  56. are divided into the following number ranges:
  57. 1) apache will use 1-500 for ordering
  58. 2) apache will reserve 1 -100 as unused
  59. 3) apache will reserve 101-150 for pre pkg install
  60. 4) apache will reserve 151-200 for pkg install
  61. 5) apache will reserve 201-250 for pkg configure
  62. 6) apache will reserve 251-300 for downloads, git stuff, load data
  63. 7) apache will reserve 301-400 for unknown purposes
  64. 8) apache will reserve 401-450 for service restart-reloads
  65. 9) apache WILL reserve 451-460 for service.running
  66. 10) apache will reserve 461-500 for cmd requiring operational services
  67. Dependencies:
  68. * `apt <https://github.com/saltstack-formulas/apt-formula>`_
  69. Optional dependencies:
  70. 1) `php <https://github.com/saltstack-formulas/php-formula>`_
  71. Example Pillar:
  72. .. code:: yaml
  73. apache:
  74. register-site:
  75. # any name as an array index, and you can duplicate this section
  76. {{UNQIUE}}:
  77. name: 'my name'
  78. path: 'salt://path/to/sites-available/conf/file'
  79. state: 'enabled'