Saltstack Official Apache 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 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 9 година
пре 9 година
пре 11 година
пре 11 година
пре 10 година
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  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/en/latest/topics/development/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.config``
  16. -----------------
  17. Configures apache based on os_family
  18. ``apache.mod_mpm``
  19. ------------------
  20. Configures the apache mpm modules on Debian ``mpm_prefork``, ``mpm_worker`` or ``mpm_event`` (Debian Only)
  21. ``apache.modules``
  22. ------------------
  23. Enables and disables Apache modules.
  24. ``apache.mod_rewrite``
  25. ----------------------
  26. Enabled the Apache module mod_rewrite (Debian only)
  27. ``apache.mod_proxy``
  28. -------------------
  29. Enables the Apache module mod_proxy. (Debian only)
  30. ``apache.mod_proxy_http``
  31. -------------------------
  32. Enables the Apache module mod_proxy_http and requires the Apache module mod_proxy to be enabled. (Debian Only)
  33. ``apache.mod_wsgi``
  34. -------------------
  35. Installs the mod_wsgi package and enables the Apache module.
  36. ``apache.mod_actions``
  37. ----------------------
  38. Enables the Apache module mod_actions. (Debian Only)
  39. ``apache.mod_headers``
  40. ----------------------
  41. Enables the Apache module mod_headers. (Debian Only)
  42. ``apache.mod_pagespeed``
  43. ------------------------
  44. Installs and Enables the mod_pagespeed module. (Debian and RedHat Only)
  45. ``apache.mod_php5``
  46. -------------------
  47. Installs and enables the mod_php5 module
  48. ``apache.mod_fcgid``
  49. --------------------
  50. Installs and enables the mod_fcgid module
  51. ``apache.mod_dav_svn``
  52. --------------------
  53. Installs and enables the mod_dav_svn module (Debian only)
  54. ``apache.mod_security``
  55. ----------------------
  56. Installs an enables the `Apache mod_security2 WAF`<http://modsecurity.org/>`_
  57. using data from Pillar. (Debian and RedHat Only)
  58. Allows you to install the basic Core Rules (CRS) and some basic configuration for mod_security2
  59. ``apache.mod_vhost_alias``
  60. ----------------------
  61. Enables the Apache module vhost_alias (Debian Only)
  62. ``apache.mod_remoteip``
  63. ----------------------
  64. Enables and configures the Apache module mod_remoteip using data from Pillar. (Debian Only)
  65. ``apache.own_default_vhost``
  66. --------------------------
  67. Replace default vhost with own version. By default, it's 503 code. (Debian Only)
  68. ``apache.no_default_vhost``
  69. --------------------------
  70. Remove the default vhost. (Debian Only)
  71. ``apache.vhosts.standard``
  72. --------------------------
  73. Configures Apache name-based virtual hosts and creates virtual host directories using data from Pillar.
  74. Example Pillar:
  75. .. code:: yaml
  76. apache:
  77. sites:
  78. example.com: # must be unique; used as an ID declaration in Salt; also passed to the template context as {{ id }}
  79. template_file: salt://apache/vhosts/standard.tmpl
  80. When using the provided templates, one can use a space separated list
  81. of interfaces to bind to. For example, to bind both IPv4 and IPv6:
  82. .. code:: yaml
  83. apache:
  84. sites:
  85. example.com:
  86. interface: '1.2.3.4 [2001:abc:def:100::3]'
  87. ``apache.manage_security``
  88. --------------------------
  89. Configures Apache's security.conf options by reassinging them using data from Pillar.
  90. ``apache.debian_full``
  91. ----------------------
  92. Installs and configures Apache on Debian and Ubuntu systems.
  93. These states are ordered using the ``order`` declaration. Different stages
  94. are divided into the following number ranges:
  95. 1) apache will use 1-500 for ordering
  96. 2) apache will reserve 1 -100 as unused
  97. 3) apache will reserve 101-150 for pre pkg install
  98. 4) apache will reserve 151-200 for pkg install
  99. 5) apache will reserve 201-250 for pkg configure
  100. 6) apache will reserve 251-300 for downloads, git stuff, load data
  101. 7) apache will reserve 301-400 for unknown purposes
  102. 8) apache will reserve 401-450 for service restart-reloads
  103. 9) apache WILL reserve 451-460 for service.running
  104. 10) apache will reserve 461-500 for cmd requiring operational services
  105. Example Pillar:
  106. .. code:: yaml
  107. apache:
  108. register-site:
  109. # any name as an array index, and you can duplicate this section
  110. {{UNIQUE}}:
  111. name: 'my name'
  112. path: 'salt://path/to/sites-available/conf/file'
  113. state: 'enabled'