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.

552 lines
22KB

  1. # -*- coding: utf-8 -*-
  2. # vim: ft=yaml
  3. ---
  4. apache:
  5. lookup:
  6. master: template-master
  7. # apache version (generally '2.2' or '2.4')
  8. # version: '2.2'
  9. # Default value for AddDefaultCharset in RedHat configuration
  10. default_charset: 'UTF-8'
  11. # Should we enforce DocumentRoot user/group?
  12. document_root_user: null # Defaults to: apache.user
  13. document_root_group: null # Defaults to: apache.group
  14. # Just for testing purposes
  15. winner: lookup
  16. added_in_lookup: lookup_value
  17. # Using bash package and udev service as an example. This allows us to
  18. # test the template formula itself. You should set these parameters to
  19. # examples that make sense in the contexto of the formula you're writing.
  20. # pkg:
  21. # deps:
  22. # mod_ssl # redhat
  23. # mod_security # redhat
  24. # mod_geoip # redhat
  25. # GeoIP # redhat
  26. # libapache2-mod-security2 # Debian
  27. global:
  28. # global apache directives
  29. AllowEncodedSlashes: 'On'
  30. name_virtual_hosts:
  31. - interface: '*'
  32. port: 80
  33. - interface: '*'
  34. port: 443
  35. # ``apache.vhosts`` formula additional configuration:
  36. # fqdn should be added to /etc/hosts i.e. ##
  37. # $ tail -3 /etc/hosts
  38. # 127.0.0.1 example.com
  39. # 127.0.0.1 www.redirectmatch.com
  40. # 127.0.0.1 www.proxyexample.com
  41. sites:
  42. example.net:
  43. template_file: salt://apache/config/vhosts/minimal.tmpl
  44. port: '8081'
  45. example.com: # must be unique; used as an ID declaration in Salt.
  46. enabled: true
  47. # or minimal.tmpl or redirect.tmpl or proxy.tmpl
  48. template_file: salt://apache/config/vhosts/standard.tmpl
  49. ####################### DEFAULT VALUES BELOW ############################
  50. # NOTE: the values below are simply default settings that *can* be
  51. # overridden and are not required in order to use this formula to create
  52. # vhost entries.
  53. #
  54. # Do not copy the values below into your Pillar unless you intend to
  55. # modify these vaules.
  56. ####################### DEFAULT VALUES BELOW ############################
  57. template_engine: jinja
  58. interface: '*'
  59. port: '443'
  60. exclude_listen_directive: true # Do not add a Listen directive in httpd.conf
  61. ServerName: example.com # uses the unique ID above unless specified
  62. # ServerAlias: www.example.com # Do not add ServerAlias unless defined
  63. ServerAdmin: webmaster@example.com
  64. LogLevel: warn
  65. # E.g.: /var/log/apache2/example.com-error.log
  66. # ErrorLog: /path/to/logs/example.com-error.log
  67. # E.g.: /var/log/apache2/example.com-access.log
  68. # CustomLog: /path/to/logs/example.com-access.log
  69. # E.g., /var/www/example.com
  70. DocumentRoot: /path/to/www/dir/example.com
  71. # do not enforce user, defaults to lookup:document_root_user or apache.user
  72. DocumentRootUser: null
  73. # Force group, defaults to lookup:document_root_group or apache.user
  74. DocumentRootGroup: null
  75. {# {%- if grains.os_family in ('Debian', 'Suse', 'Gentoo') %} #}
  76. {# SSLCertificateFile: /etc/apache2/conf/server.crt #}
  77. {# SSLCertificateKeyFile: /etc/apache2/conf/server.key #}
  78. {# {%- else %} #}
  79. {# SSLCertificateFile: /etc/httpd/conf/server.crt #}
  80. {# SSLCertificateKeyFile: /etc/httpd/conf/server.key #}
  81. {# {%- endif %} #}
  82. {# # SSLCertificateChainFile: /etc/httpd/ssl/example.com.cer #}
  83. {# #}
  84. {# SSLCertificateFile_content: | #}
  85. {# -----BEGIN CERTIFICATE----- #}
  86. {# MIIDYTCCAkkCFCKCcuwB/Ze9bI5/75oRChNH8RzHMA0GCSqGSIb3DQEBCwUAMG0x #}
  87. {# CzAJBgNVBAYTAklFMREwDwYDVQQIDAhDb25uYWNodDESMBAGA1UEBwwJQ29ubWFp #}
  88. {# Y25lMSEwHwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxFDASBgNVBAMM #}
  89. {# C2V4YW1wbGUuY29tMB4XDTIwMTAwMzEzMzI1N1oXDTIxMTAwMzEzMzI1N1owbTEL #}
  90. {# MAkGA1UEBhMCSUUxETAPBgNVBAgMCENvbm5hY2h0MRIwEAYDVQQHDAlDb25tYWlj #}
  91. {# bmUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEUMBIGA1UEAwwL #}
  92. {# ZXhhbXBsZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDSl0qL #}
  93. {# ol+/b3R9VccpOLe5Cg1Tf1zstAzV5TvjcjSdytdwMDGy9J8Yi2EcMZ1wNdMkvf4D #}
  94. {# mr+72Za+qeHHc0ZA+fIJoV+tTcbLbV/mhv0i0i7Zldi3QuvIVBpLR2Z5s5mXZ7C8 #}
  95. {# yz8VpF9enQkS3uNnbNuZNT3ElGHmlAj1yHsh0K+TbvZrygFkG0wvYwivhlt1Zcbo #}
  96. {# th4LJ+gBwNIdSJUiAa58VO5ZNeenM9DquJfZVcFc1bDFqzU0T9KY4PsxmzO1A2+m #}
  97. {# TDHoGR4nCz7B+5Ec4USyBUuKo2FhALBEtYz2hlwaf9XasSSvmzO5hhPCQ3nJ4qeY #}
  98. {# i+BLCSpiq2lApPVZAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAD9/78A4ygQWbO27 #}
  99. {# jQPm+2Zg0f9Sn1tcD4tOVao0MlAfWrALjbmj82hg+givEQKAuN7ptthYoaJcOxHl #}
  100. {# aUe++y3bQiCznN73yKSJZFgG5fYR8tyMslsYRBcKSay0nvPhN/3Jry0nNehDREQ+ #}
  101. {# 2H0vB595bymGNTmux13sNwOZH1i8KEgxdLcFbje87+CbhCGbFhS3lHPY2FeXnHpO #}
  102. {# W60Zchwsy06xMjo4rzbQatdJj/HAh6lIx0YmNDX/d3dCLpZlkvUBT6ENVhipi5bb #}
  103. {# 2pF/Awob8AYWbIn4N7gmIP5Sb0tugpEgrSgSyDdZNWoFDChvfHXcNUP8lblIftAl #}
  104. {# ylssbnQ= #}
  105. {# -----END CERTIFICATE----- #}
  106. {# #}
  107. {# SSLCertificateKeyFile_content: | #}
  108. {# -----BEGIN RSA PRIVATE KEY----- #}
  109. {# MIIEowIBAAKCAQEA0pdKi6Jfv290fVXHKTi3uQoNU39c7LQM1eU743I0ncrXcDAx #}
  110. {# svSfGIthHDGdcDXTJL3+A5q/u9mWvqnhx3NGQPnyCaFfrU3Gy21f5ob9ItIu2ZXY #}
  111. {# t0LryFQaS0dmebOZl2ewvMs/FaRfXp0JEt7jZ2zbmTU9xJRh5pQI9ch7IdCvk272 #}
  112. {# a8oBZBtML2MIr4ZbdWXG6LYeCyfoAcDSHUiVIgGufFTuWTXnpzPQ6riX2VXBXNWw #}
  113. {# xas1NE/SmOD7MZsztQNvpkwx6BkeJws+wfuRHOFEsgVLiqNhYQCwRLWM9oZcGn/V #}
  114. {# 2rEkr5szuYYTwkN5yeKnmIvgSwkqYqtpQKT1WQIDAQABAoIBAQCI39SP1UWuQ17P #}
  115. {# Z8U+waKIHkRzFMDtCEmfbJL0TfJs7L4CKRDkY6JUbaL8lDLkD9fgdax340jja5VS #}
  116. {# 70/UNtRevxXVtJFfLsIazkgaqXo1+65/talZ06E0X5WHgCzWxSj7A2YYD3I9OszR #}
  117. {# zfdr0Hq1akeA2N4AuwC2wVjhhyCg5Lg4xY0l+kRFLrPU4RctsjCAaveVIm3wmJVd #}
  118. {# vmHO9hKcR3nxuIx0/cPYe20WgGSqbYJQburE1uXp26uz/Jek/u8FNFIEjWCWB+vj #}
  119. {# eRQOcxngebyWCh0dyoxb3nL28Yty9O1MlLP2b0YMmep1ZfEFtwn4M2d8FdW1WCmJ #}
  120. {# viOGFx4BAoGBAPTYSIpyxea1qaeNmT97e4YgPwV3rajhdPRYSQKyCsjKHk7Q/uxk #}
  121. {# Phddo0ymiGKLCRAUwg9py900slY8mZKbdrVxXV4EEhngrWrr2gpfzxkEF1i0d4bS #}
  122. {# 2OuRCbkfE23glxqtVjvnTlrRANaXgk5mUQCL1YDUf+hrpEvF0pTbDRYpAoGBANwv #}
  123. {# ffy+Sk+e0v+NlthhNHUDcXisIoW7b/DoT0H8DtbJV/QVexaGln7Ts6EgaH2NdpC+ #}
  124. {# dyLKa+l7oIeKgXeHm2Tgm879di/ChQCkoAHIUu5Nm0c5D2Vst26JrfCA7vZb9ddI #}
  125. {# FMFt5bsDgRqFzTXFe0k9TEIBiF0Pp5xfHVwNWeuxAoGAGNY3xZOO77BN3WlHumDU #}
  126. {# Tu7Gdc+GFjOIoaCzB0r4PRYDrQsWUPR6N/SPtB7Qhu6DpNX2OYoJ3A6UaJsNGQoc #}
  127. {# KJuvVPIkw+s+rDHwlEzTvT3lAGKOHWcWCg9UZSr51ZOKwHIE5V65XA0HgL0twrYu #}
  128. {# UVfd+IuVzgXdTLJsgh0WXsECgYApcgcU+/yg4BR3Zf9u2100aWGChWQ6J/36KsBA #}
  129. {# e2GPrHaRyzlQFCVf2hmFysPgXjBjLnbeZZvKZyrgWIHmLfBiHKU3YR5N/x9p75Lu #}
  130. {# wvZZROJllagAP2aHuAK1so9IcCbmTvsZLcaAXTh/9Y+a/4ElWBRymDdCzR+Pn5e3 #}
  131. {# LAwxAQKBgBHH42ri6pHbRptINzJ9sw3PhwewQZtGu3sfvrOknBs3togptCrjBWDF #}
  132. {# eOGuFmjHO9vnhWs2yWQYETL1jt+CWgzRc4o4akB3qH5sXar5F7h06y16RFV9u6UJ #}
  133. {# qaGqPFcy/l/5H6uNPLZt4Ufg3T0Mz0Az+Dti99KqVLKeqWQvXVc4 #}
  134. {# -----END RSA PRIVATE KEY----- #}
  135. Directory:
  136. # "default" is a special case; uses DocumentRoot value
  137. # E.g.: /var/www/example.com
  138. default:
  139. Options: -Indexes +FollowSymLinks
  140. Order: allow,deny # For Apache < 2.4
  141. Allow: from all # For apache < 2.4
  142. Require: all granted # For apache > 2.4.
  143. AllowOverride: None
  144. # Formula_Append: |
  145. # Additional config as a
  146. # multi-line string here
  147. # Force SSL: Redirect from 80 to 443
  148. example2.com:
  149. port: 80
  150. template_file: salt://apache/vhosts/redirect.tmpl
  151. RedirectSource: 'permanent /'
  152. # Trailing slash is important
  153. RedirectTarget: 'https://example.com/'
  154. example2.com_ssl:
  155. port: 443
  156. ServerName: example.com
  157. # SSLCertificateFile: /path/to/ssl.crt
  158. # SSLCertificateKeyFile: /path/to/ssl.key
  159. # SSLCertificateChainFile: /path/to/ssl.ca.crt
  160. # Use RedirectMatch Directive
  161. redirectmatch.com:
  162. # - https://httpd.apache.org/docs/2.4/fr/mod/mod_alias.html#redirectmatch
  163. # Require module mod_alias
  164. enabled: true
  165. template_file: salt://apache/config/vhosts/redirect.tmpl
  166. ServerName: www.redirectmatch.com
  167. ServerAlias: www.redirectmatch.com
  168. RedirectMatch: true
  169. RedirectSource: '^/$'
  170. RedirectTarget: '/subdirectory'
  171. DocumentRoot: /var/www/html/
  172. port: '8083'
  173. 8084-proxyexample.com:
  174. template_file: salt://apache/config/vhosts/redirect.tmpl
  175. ServerName: www.proxyexample.com
  176. ServerAlias: www.proxyexample.com
  177. RedirectSource: '/'
  178. RedirectTarget: 'https://www.proxyexample.com/'
  179. DocumentRoot: /var/www/proxy
  180. port: '8084'
  181. # 8443-proxyexample.com:
  182. # template_file: salt://apache/config/vhosts/proxy.tmpl
  183. # ServerName: www.proxyexample.com
  184. # ServerAlias: www.proxyexample.com
  185. # interface: '*'
  186. # port: '8443'
  187. # DocumentRoot: /var/www/proxy
  188. #
  189. # Rewrite: |
  190. # RewriteRule ^/webmail$ /webmail/ [R]
  191. # RewriteRule ^/webmail(.*) http://mail.example.com$1 [P,L]
  192. # RewriteRule ^/vicescws(.*) http://svc.example.com:92$1 [P,L]
  193. #
  194. # SSLCertificateFile: /etc/httpd/conf/server.crt
  195. # SSLCertificateKeyFile: /etc/httpd/conf/server.key
  196. # # SSLCertificateChainFile: /etc/httpd/ssl/example.com.cer
  197. #
  198. # SSLCertificateFile_content: |
  199. # -----BEGIN CERTIFICATE-----
  200. # MIIDYTCCAkkCFCKCcuwB/Ze9bI5/75oRChNH8RzHMA0GCSqGSIb3DQEBCwUAMG0x
  201. # CzAJBgNVBAYTAklFMREwDwYDVQQIDAhDb25uYWNodDESMBAGA1UEBwwJQ29ubWFp
  202. # Y25lMSEwHwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxFDASBgNVBAMM
  203. # C2V4YW1wbGUuY29tMB4XDTIwMTAwMzEzMzI1N1oXDTIxMTAwMzEzMzI1N1owbTEL
  204. # MAkGA1UEBhMCSUUxETAPBgNVBAgMCENvbm5hY2h0MRIwEAYDVQQHDAlDb25tYWlj
  205. # bmUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEUMBIGA1UEAwwL
  206. # ZXhhbXBsZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDSl0qL
  207. # ol+/b3R9VccpOLe5Cg1Tf1zstAzV5TvjcjSdytdwMDGy9J8Yi2EcMZ1wNdMkvf4D
  208. # mr+72Za+qeHHc0ZA+fIJoV+tTcbLbV/mhv0i0i7Zldi3QuvIVBpLR2Z5s5mXZ7C8
  209. # yz8VpF9enQkS3uNnbNuZNT3ElGHmlAj1yHsh0K+TbvZrygFkG0wvYwivhlt1Zcbo
  210. # th4LJ+gBwNIdSJUiAa58VO5ZNeenM9DquJfZVcFc1bDFqzU0T9KY4PsxmzO1A2+m
  211. # TDHoGR4nCz7B+5Ec4USyBUuKo2FhALBEtYz2hlwaf9XasSSvmzO5hhPCQ3nJ4qeY
  212. # i+BLCSpiq2lApPVZAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAD9/78A4ygQWbO27
  213. # jQPm+2Zg0f9Sn1tcD4tOVao0MlAfWrALjbmj82hg+givEQKAuN7ptthYoaJcOxHl
  214. # aUe++y3bQiCznN73yKSJZFgG5fYR8tyMslsYRBcKSay0nvPhN/3Jry0nNehDREQ+
  215. # 2H0vB595bymGNTmux13sNwOZH1i8KEgxdLcFbje87+CbhCGbFhS3lHPY2FeXnHpO
  216. # W60Zchwsy06xMjo4rzbQatdJj/HAh6lIx0YmNDX/d3dCLpZlkvUBT6ENVhipi5bb
  217. # 2pF/Awob8AYWbIn4N7gmIP5Sb0tugpEgrSgSyDdZNWoFDChvfHXcNUP8lblIftAl
  218. # ylssbnQ=
  219. # -----END CERTIFICATE-----
  220. #
  221. # SSLCertificateKeyFile_content: |
  222. # -----BEGIN RSA PRIVATE KEY-----
  223. # MIIEowIBAAKCAQEA0pdKi6Jfv290fVXHKTi3uQoNU39c7LQM1eU743I0ncrXcDAx
  224. # svSfGIthHDGdcDXTJL3+A5q/u9mWvqnhx3NGQPnyCaFfrU3Gy21f5ob9ItIu2ZXY
  225. # t0LryFQaS0dmebOZl2ewvMs/FaRfXp0JEt7jZ2zbmTU9xJRh5pQI9ch7IdCvk272
  226. # a8oBZBtML2MIr4ZbdWXG6LYeCyfoAcDSHUiVIgGufFTuWTXnpzPQ6riX2VXBXNWw
  227. # xas1NE/SmOD7MZsztQNvpkwx6BkeJws+wfuRHOFEsgVLiqNhYQCwRLWM9oZcGn/V
  228. # 2rEkr5szuYYTwkN5yeKnmIvgSwkqYqtpQKT1WQIDAQABAoIBAQCI39SP1UWuQ17P
  229. # Z8U+waKIHkRzFMDtCEmfbJL0TfJs7L4CKRDkY6JUbaL8lDLkD9fgdax340jja5VS
  230. # 70/UNtRevxXVtJFfLsIazkgaqXo1+65/talZ06E0X5WHgCzWxSj7A2YYD3I9OszR
  231. # zfdr0Hq1akeA2N4AuwC2wVjhhyCg5Lg4xY0l+kRFLrPU4RctsjCAaveVIm3wmJVd
  232. # vmHO9hKcR3nxuIx0/cPYe20WgGSqbYJQburE1uXp26uz/Jek/u8FNFIEjWCWB+vj
  233. # eRQOcxngebyWCh0dyoxb3nL28Yty9O1MlLP2b0YMmep1ZfEFtwn4M2d8FdW1WCmJ
  234. # viOGFx4BAoGBAPTYSIpyxea1qaeNmT97e4YgPwV3rajhdPRYSQKyCsjKHk7Q/uxk
  235. # Phddo0ymiGKLCRAUwg9py900slY8mZKbdrVxXV4EEhngrWrr2gpfzxkEF1i0d4bS
  236. # 2OuRCbkfE23glxqtVjvnTlrRANaXgk5mUQCL1YDUf+hrpEvF0pTbDRYpAoGBANwv
  237. # ffy+Sk+e0v+NlthhNHUDcXisIoW7b/DoT0H8DtbJV/QVexaGln7Ts6EgaH2NdpC+
  238. # dyLKa+l7oIeKgXeHm2Tgm879di/ChQCkoAHIUu5Nm0c5D2Vst26JrfCA7vZb9ddI
  239. # FMFt5bsDgRqFzTXFe0k9TEIBiF0Pp5xfHVwNWeuxAoGAGNY3xZOO77BN3WlHumDU
  240. # Tu7Gdc+GFjOIoaCzB0r4PRYDrQsWUPR6N/SPtB7Qhu6DpNX2OYoJ3A6UaJsNGQoc
  241. # KJuvVPIkw+s+rDHwlEzTvT3lAGKOHWcWCg9UZSr51ZOKwHIE5V65XA0HgL0twrYu
  242. # UVfd+IuVzgXdTLJsgh0WXsECgYApcgcU+/yg4BR3Zf9u2100aWGChWQ6J/36KsBA
  243. # e2GPrHaRyzlQFCVf2hmFysPgXjBjLnbeZZvKZyrgWIHmLfBiHKU3YR5N/x9p75Lu
  244. # wvZZROJllagAP2aHuAK1so9IcCbmTvsZLcaAXTh/9Y+a/4ElWBRymDdCzR+Pn5e3
  245. # LAwxAQKBgBHH42ri6pHbRptINzJ9sw3PhwewQZtGu3sfvrOknBs3togptCrjBWDF
  246. # eOGuFmjHO9vnhWs2yWQYETL1jt+CWgzRc4o4akB3qH5sXar5F7h06y16RFV9u6UJ
  247. # qaGqPFcy/l/5H6uNPLZt4Ufg3T0Mz0Az+Dti99KqVLKeqWQvXVc4
  248. # -----END RSA PRIVATE KEY-----
  249. #
  250. # SSLCertificateChainFile_content: |
  251. # -----BEGIN CERTIFICATE-----
  252. # MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL
  253. # MAkGA1UECBMCUE4xCzAJBgNVBAcTAkNOMQswCQYDVQQKEwJPTjELMAkGA1UECxMC
  254. # VU4xFDASBgNVBAMTC0hlcm9uZyBZYW5nMB4XDTA1MDcxNTIxMTk0N1oXDTA1MDgx
  255. # NDIxMTk0N1owVzELMAkGA1UEBhMCQ04xCzAJBgNVBAgTAlBOMQswCQYDVQQHEwJD
  256. # TjELMAkGA1UEChMCT04xCzAJBgNVBAsTAlVOMRQwEgYDVQQDEwtIZXJvbmcgWWFu
  257. # ZzBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQCp5hnG7ogBhtlynpOS21cBewKE/B7j
  258. # V14qeyslnr26xZUsSVko36ZnhiaO/zbMOoRcKK9vEcgMtcLFuQTWDl3RAgMBAAGj
  259. # gbEwga4wHQYDVR0OBBYEFFXI70krXeQDxZgbaCQoR4jUDncEMH8GA1UdIwR4MHaA
  260. # FFXI70krXeQDxZgbaCQoR4jUDncEoVukWTBXMQswCQYDVQQGEwJDTjELMAkGA1UE
  261. # CBMCUE4xCzAJBgNVBAcTAkNOMQswCQYDVQQKEwJPTjELMAkGA1UECxMCVU4xFDAS
  262. # BgNVBAMTC0hlcm9uZyBZYW5nggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEE
  263. # BQADQQA/ugzBrjjK9jcWnDVfGHlk3icNRq0oV7Ri32z/+HQX67aRfgZu7KWdI+Ju
  264. # Wm7DCfrPNGVwFWUQOmsPue9rZBgO
  265. # -----END CERTIFICATE-----
  266. # -----BEGIN CERTIFICATE-----
  267. # MIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL
  268. # MAkGA1UECBMCUE4xCzAJBgNVBAcTAkNOMQswCQYDVQQKEwJPTjELMAkGA1UECxMC
  269. # VU4xFDASBgNVBAMTC0hlcm9uZyBZYW5nMB4XDTA1MDcxNTIxMTk0N1oXDTA1MDgx
  270. # NDIxMTk0N1owVzELMAkGA1UEBhMCQ04xCzAJBgNVBAgTAlBOMQswCQYDVQQHEwJD
  271. # TjELMAkGA1UEChMCT04xCzAJBgNVBAsTAlVOMRQwEgYDVQQDEwtIZXJvbmcgWWFu
  272. # ZzBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQCp5hnG7ogBhtlynpOS21cBewKE/B7j
  273. # V14qeyslnr26xZUsSVko36ZnhiaO/zbMOoRcKK9vEcgMtcLFuQTWDl3RAgMBAAGj
  274. # gbEwga4wHQYDVR0OBBYEFFXI70krXeQDxZgbaCQoR4jUDncEMH8GA1UdIwR4MHaA
  275. # FFXI70krXeQDxZgbaCQoR4jUDncEoVukWTBXMQswCQYDVQQGEwJDTjELMAkGA1UE
  276. # CBMCUE4xCzAJBgNVBAcTAkNOMQswCQYDVQQKEwJPTjELMAkGA1UECxMCVU4xFDAS
  277. # BgNVBAMTC0hlcm9uZyBZYW5nggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEE
  278. # BQADQQA/ugzBrjjK9jcWnDVfGHlk3icNRq0oV7Ri32z/+HQX67aRfgZu7KWdI+Ju
  279. # Wm7DCfrPNGVwFWUQOmsPue9rZBgO
  280. # -----END CERTIFICATE-----
  281. #
  282. # ProxyRequests: 'Off'
  283. # ProxyPreserveHost: 'On'
  284. #
  285. # ProxyRoute:
  286. # example prod proxy route:
  287. # ProxyPassSource: '/'
  288. # ProxyPassTarget: 'http://prod.example.com:85/'
  289. # ProxyPassTargetOptions: 'connectiontimeout=10 timeout=90'
  290. # ProxyPassReverseSource: '/'
  291. # ProxyPassReverseTarget: 'http://prod.example.com:85/'
  292. #
  293. # example webmail proxy route:
  294. # ProxyPassSource: '/webmail/'
  295. # ProxyPassTarget: 'http://mail.example.com/'
  296. # ProxyPassTargetOptions: 'connectiontimeout=10 timeout=90'
  297. # ProxyPassReverseSource: '/webmail/'
  298. # ProxyPassReverseTarget: 'http://mail.example.com/'
  299. #
  300. # example service proxy route:
  301. # ProxyPassSource: '/svc/'
  302. # ProxyPassTarget: 'http://svc.example.com:92/'
  303. # ProxyPassTargetOptions: 'connectiontimeout=10 timeout=90'
  304. # ProxyPassReverseSource: '/svc/'
  305. # ProxyPassReverseTarget: 'http://svc.example.com:92/'
  306. #
  307. # Location:
  308. # /:
  309. # Require: false
  310. # # Formula_Append: |
  311. # # SecRuleRemoveById 981231
  312. # # SecRuleRemoveById 981173
  313. #
  314. # /error:
  315. # Require: 'all granted'
  316. #
  317. # /docs:
  318. # Order: allow,deny # For Apache < 2.4
  319. # Allow: from all # For apache < 2.4
  320. # Require: all granted # For apache > 2.4.
  321. # # Formula_Append: |
  322. # # Additional config as a
  323. # # multi-line string here
  324. #
  325. # LocationMatch:
  326. # '^[.\\/]+([Ww][Ee][Bb][Mm][Aa][Ii][Ll])[.\\/]':
  327. # Require: false
  328. # Formula_Append: |
  329. # RequestHeader set Host mail.example.com
  330. #
  331. # '^[.\\/]+([Ss][Vv][Cc])[.\\/]':
  332. # Require: false
  333. # Formula_Append: |
  334. # Require ip 123.123.13.6 84.24.25.74
  335. #
  336. # Proxy_control:
  337. # '*':
  338. # AllowAll: false
  339. # AllowCountry: false
  340. # # - DE
  341. # AllowIP:
  342. # - 12.5.25.32
  343. # - 12.5.25.33
  344. #
  345. # Alias:
  346. # /docs: /usr/share/docs
  347. #
  348. # ScriptAlias:
  349. # /cgi-bin/: /var/www/cgi-bin/
  350. # Formula_Append: |
  351. # \#Additional config as a
  352. # \#multi-line string here
  353. # ``apache.debian_full`` formula additional configuration:
  354. register-site:
  355. # any name as an array index, and you can duplicate this section
  356. unique_value_here:
  357. name: 'myname'
  358. path: 'salt://apache/files/myname.conf'
  359. state: 'enabled'
  360. # Optional - use managed file as Jinja Template
  361. # template: true
  362. # defaults:
  363. # custom_var: "default value"
  364. modules:
  365. enabled: # List modules to enable
  366. - ssl
  367. # - prefork
  368. - rewrite
  369. - proxy
  370. - proxy_ajp
  371. - proxy_html
  372. - headers
  373. # geoip
  374. - status
  375. # - logio
  376. - dav
  377. - dav_fs
  378. - dav_lock
  379. - auth_digest
  380. - socache_shmcb
  381. # - watchdog
  382. - xml2enc
  383. - ldap
  384. disabled: # List modules to disable
  385. - geoip
  386. flags:
  387. enabled: # List server flags to enable
  388. - SSL
  389. disabled: # List server flags to disable
  390. - status
  391. # KeepAlive: Whether or not to allow persistent connections (more than
  392. # one request per connection). Set to "Off" to deactivate.
  393. keepalive: 'On'
  394. TimeOut: 60 # software default is 60 seconds
  395. security:
  396. # can be Full | OS | Minimal | Minor | Major | Prod
  397. # where Full conveys the most information, and Prod the least.
  398. ServerTokens: Prod
  399. # [debian only] configure mod_ssl
  400. ssl:
  401. SSLCipherSuite: 'HIGH:!aNULL'
  402. SSLHonorCipherOrder: 'Off'
  403. SSLProtocol: 'all -SSLv3'
  404. SSLUseStapling: 'Off'
  405. SSLStaplingResponderTimeout: '5'
  406. SSLStaplingReturnResponderErrors: 'Off'
  407. SSLStaplingCache: 'shmcb:/var/run/ocsp(128000)'
  408. # ``apache.mod_remoteip`` formula additional configuration:
  409. mod_remoteip:
  410. RemoteIPHeader: X-Forwarded-For
  411. RemoteIPTrustedProxy:
  412. - 10.0.8.0/24
  413. - 127.0.0.1
  414. RemoteIPInternalProxy:
  415. - 10.10.8.0/24
  416. - 127.0.0.1
  417. # ``apache.mod_security`` formula additional configuration:
  418. mod_security:
  419. crs_install: false
  420. # If not set, default distro's configuration is installed as is
  421. manage_config: true
  422. sec_rule_engine: 'On'
  423. sec_request_body_access: 'On'
  424. sec_request_body_limit: '14000000'
  425. sec_request_body_no_files_limit: '114002'
  426. sec_request_body_in_memory_limit: '114002'
  427. sec_request_body_limit_action: 'Reject'
  428. sec_pcre_match_limit: '15000'
  429. sec_pcre_match_limit_recursion: '15000'
  430. sec_debug_log_level: '3'
  431. rules:
  432. # enabled: ~
  433. modsecurity_crs_10_setup.conf:
  434. rule_set: ''
  435. enabled: true
  436. modsecurity_crs_20_protocol_violations.conf:
  437. rule_set: 'base_rules'
  438. enabled: false
  439. custom_rule_files:
  440. # any name as an array index, and you can duplicate this section
  441. UNIQUE_VALUE_HERE:
  442. file: 'myname'
  443. # path/to/modsecurity/custom/file
  444. path: 'salt://apache/files/dummy.conf'
  445. enabled: false
  446. mod_ssl:
  447. # set this to true if you want to override your distributions default TLS
  448. # configuration
  449. manage_tls_defaults: false
  450. # This stuff is deliberately not configured via map.jinja resp.
  451. # apache:lookup. We're unable to know sane defaults for each release of
  452. # every distribution.
  453. # See https://github.com/saltstack-formulas/openssh-formula/issues/102 for
  454. # a related discussion Have a look at bettercrypto.org for up-to-date
  455. # settings.
  456. # These are default values:
  457. # yamllint disable-line rule:line-length
  458. SSLCipherSuite: EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!ECDSA:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SHA
  459. # Mitigate the CRIME attack
  460. SSLCompression: 'Off'
  461. SSLProtocol: all -SSLv2 -SSLv3 -TLSv1
  462. SSLHonorCipherOrder: 'On'
  463. SSLOptions: "+StrictRequire"
  464. server_status_require:
  465. ip:
  466. - 10.8.8.0/24
  467. host:
  468. - foo.example.com
  469. tofs:
  470. # The files_switch key serves as a selector for alternative
  471. # directories under the formula files directory. See TOFS pattern
  472. # doc for more info.
  473. # Note: Any value not evaluated by `config.get` will be used literally.
  474. # This can be used to set custom paths, as many levels deep as required.
  475. files_switch:
  476. - any/path/can/be/used/here
  477. - id
  478. - roles
  479. - osfinger
  480. - os
  481. - os_family
  482. # All aspects of path/file resolution are customisable using the options below.
  483. # This is unnecessary in most cases; there are sensible defaults.
  484. # Default path: salt://< path_prefix >/< dirs.files >/< dirs.default >
  485. # I.e.: salt://apache/files/default
  486. # path_prefix: template_alt
  487. # dirs:
  488. # files: files_alt
  489. # default: default_alt
  490. # The entries under `source_files` are prepended to the default source files
  491. # given for the state
  492. # source_files:
  493. # apache-config-file-file-managed:
  494. # - 'example_alt.tmpl'
  495. # - 'example_alt.tmpl.jinja'
  496. # For testing purposes
  497. source_files:
  498. apache-config-file-file-managed:
  499. - 'example.tmpl.jinja'
  500. apache-subcomponent-config-file-file-managed:
  501. - 'subcomponent-example.tmpl.jinja'
  502. # Just for testing purposes
  503. winner: pillar
  504. added_in_pillar: pillar_value
  505. retry_option:
  506. # https://docs.saltstack.com/en/latest/ref/states/requisites.html#retrying-states
  507. attempts: 1
  508. until: true
  509. interval: 1
  510. splay: 1