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.

README.rst 5.5KB

11 years ago
11 years ago
10 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  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.certificates``
  19. -----------------
  20. Deploy SSL certificates from pillars
  21. ``apache.mod_mpm``
  22. ------------------
  23. Configures the apache mpm modules on Debian ``mpm_prefork``, ``mpm_worker`` or ``mpm_event`` (Debian Only)
  24. ``apache.modules``
  25. ------------------
  26. Enables and disables Apache modules.
  27. ``apache.mod_rewrite``
  28. ----------------------
  29. Enabled the Apache module mod_rewrite (Debian and FreeBSD only)
  30. ``apache.mod_proxy``
  31. -------------------
  32. Enables the Apache module mod_proxy. (Debian and FreeBSD only)
  33. ``apache.mod_proxy_http``
  34. -------------------------
  35. Enables the Apache module mod_proxy_http and requires the Apache module mod_proxy to be enabled. (Debian Only)
  36. ``apache.mod_proxy_fcgi``
  37. -------------------------
  38. Enables the Apache module mod_proxy_fcgi and requires the Apache module mod_proxy to be enabled. (Debian Only)
  39. ``apache.mod_wsgi``
  40. -------------------
  41. Installs the mod_wsgi package and enables the Apache module.
  42. ``apache.mod_actions``
  43. ----------------------
  44. Enables the Apache module mod_actions. (Debian Only)
  45. ``apache.mod_headers``
  46. ----------------------
  47. Enables the Apache module mod_headers. (Debian Only)
  48. ``apache.mod_pagespeed``
  49. ------------------------
  50. Installs and Enables the mod_pagespeed module. (Debian and RedHat Only)
  51. ``apache.mod_perl2``
  52. -------------------
  53. Installs and enables the mod_perl2 module (Debian and FreeBSD only)
  54. ``apache.mod_geoip``
  55. -------------------
  56. Installs and enables the mod_geoIP (RedHat only)
  57. ``apache.mod_php5``
  58. -------------------
  59. Installs and enables the mod_php5 module
  60. ``apache.mod_cgi``
  61. ---------------------
  62. Enables mod_cgi. (FreeBSD only)
  63. ``apache.mod_fcgid``
  64. --------------------
  65. Installs and enables the mod_fcgid module
  66. ``apache.mod_fastcgi``
  67. --------------------
  68. Installs and enables the mod_fastcgi module
  69. ``apache.mod_dav_svn``
  70. --------------------
  71. Installs and enables the mod_dav_svn module (Debian only)
  72. ``apache.mod_security``
  73. ----------------------
  74. Installs an enables the `Apache mod_security2 WAF`<http://modsecurity.org/>`_
  75. using data from Pillar. (Debian and RedHat Only)
  76. Allows you to install the basic Core Rules (CRS) and some basic configuration for mod_security2
  77. ``apache.mod_security.rules``
  78. -----------------------------
  79. This state can create symlinks based on basic Core Rules package. (Debian only)
  80. Or it can distribute a mod_security rule file and place it /etc/modsecurity/
  81. ``mod_socache_shmcb``
  82. ---------------------
  83. Enables mod_socache_shmcb. (FreeBSD only)
  84. ``apache.mod_ssl``
  85. ----------------------
  86. Installs and enables the mod_ssl module (Debian, RedHat and FreeBSD only)
  87. ``apache.mod_suexec``
  88. ---------------------
  89. Enables mod_suexec. (FreeBSD only)
  90. ``apache.mod_vhost_alias``
  91. ----------------------
  92. Enables the Apache module vhost_alias (Debian Only)
  93. ``apache.mod_remoteip``
  94. ----------------------
  95. Enables and configures the Apache module mod_remoteip using data from Pillar. (Debian Only)
  96. ``apache.mod_xsendfile``
  97. ----------------------
  98. Installs and enables mod_xsendfile module. (Debian Only)
  99. ``apache.own_default_vhost``
  100. --------------------------
  101. Replace default vhost with own version. By default, it's 503 code. (Debian Only)
  102. ``apache.no_default_vhost``
  103. --------------------------
  104. Remove the default vhost. (Debian Only)
  105. ``apache.vhosts.standard``
  106. --------------------------
  107. Configures Apache name-based virtual hosts and creates virtual host directories using data from Pillar.
  108. Example Pillar:
  109. .. code:: yaml
  110. apache:
  111. sites:
  112. example.com: # must be unique; used as an ID declaration in Salt; also passed to the template context as {{ id }}
  113. template_file: salt://apache/vhosts/standard.tmpl
  114. When using the provided templates, one can use a space separated list
  115. of interfaces to bind to. For example, to bind both IPv4 and IPv6:
  116. .. code:: yaml
  117. apache:
  118. sites:
  119. example.com:
  120. interface: '1.2.3.4 [2001:abc:def:100::3]'
  121. ``apache.manage_security``
  122. --------------------------
  123. Configures Apache's security.conf options by reassinging them using data from Pillar.
  124. ``apache.debian_full``
  125. ----------------------
  126. Installs and configures Apache on Debian and Ubuntu systems.
  127. ``apache.uninstall``
  128. ----------
  129. Stops the Apache service and uninstalls the package.
  130. These states are ordered using the ``order`` declaration. Different stages
  131. are divided into the following number ranges:
  132. 1) apache will use 1-500 for ordering
  133. 2) apache will reserve 1 -100 as unused
  134. 3) apache will reserve 101-150 for pre pkg install
  135. 4) apache will reserve 151-200 for pkg install
  136. 5) apache will reserve 201-250 for pkg configure
  137. 6) apache will reserve 251-300 for downloads, git stuff, load data
  138. 7) apache will reserve 301-400 for unknown purposes
  139. 8) apache will reserve 401-450 for service restart-reloads
  140. 9) apache WILL reserve 451-460 for service.running
  141. 10) apache will reserve 461-500 for cmd requiring operational services
  142. Example Pillar:
  143. .. code:: yaml
  144. apache:
  145. register-site:
  146. # any name as an array index, and you can duplicate this section
  147. {{UNIQUE}}:
  148. name: 'my name'
  149. path: 'salt://path/to/sites-available/conf/file'
  150. state: 'enabled'