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.

164 lines
5.0KB

  1. # ``apache`` formula configuration:
  2. apache:
  3. # lookup section overrides ``map.jinja`` values
  4. lookup:
  5. server: apache2
  6. service: apache2
  7. vhostdir: /etc/apache2/sites-available
  8. confdir: /etc/apache2/conf.d
  9. confext: .conf
  10. logdir: /var/log/apache2
  11. wwwdir: /srv/apache2
  12. # apache version (generally '2.2' or '2.4')
  13. version: '2.2'
  14. # ``apache.mod_wsgi`` formula additional configuration:
  15. mod_wsgi: mod_wsgi
  16. global:
  17. # global apache directives
  18. AllowEncodedSlashes: 'On'
  19. name_virtual_hosts:
  20. - interface: '*'
  21. port: 80
  22. - interface: '*'
  23. port: 443
  24. # ``apache.vhosts`` formula additional configuration:
  25. sites:
  26. example.net:
  27. template_file: salt://apache/vhosts/minimal.tmpl
  28. example.com: # must be unique; used as an ID declaration in Salt.
  29. enabled: True
  30. template_file: salt://apache/vhosts/standard.tmpl # or redirect.tmpl or proxy.tmpl
  31. ####################### DEFAULT VALUES BELOW ############################
  32. # NOTE: the values below are simply default settings that *can* be
  33. # overridden and are not required in order to use this formula to create
  34. # vhost entries.
  35. #
  36. # Do not copy the values below into your Pillar unless you intend to
  37. # modify these vaules.
  38. ####################### DEFAULT VALUES BELOW ############################
  39. template_engine: jinja
  40. interface: '*'
  41. port: '80'
  42. ServerName: example.com # uses the unique ID above unless specified
  43. ServerAlias: www.example.com
  44. ServerAdmin: webmaster@example.com
  45. LogLevel: warn
  46. ErrorLog: /path/to/logs/example.com-error.log # E.g.: /var/log/apache2/example.com-error.log
  47. CustomLog: /path/to/logs/example.com-access.log # E.g.: /var/log/apache2/example.com-access.log
  48. DocumentRoot: /path/to/www/dir/example.com # E.g., /var/www/example.com
  49. SSLCertificateFile: /etc/ssl/mycert.pem # if ssl is desired
  50. SSLCertificateKeyFile: /etc/ssl/mycert.pem.key # if key for cert is needed or in an extra file
  51. SSLCertificateChainFile: /etc/ssl/mycert.chain.pem # if you require a chain of server certificates file
  52. Directory:
  53. # "default" is a special case; Adds ``/path/to/www/dir/example.com``
  54. # E.g.: /var/www/example.com
  55. default:
  56. Options: -Indexes +FollowSymLinks
  57. Order: allow,deny # For Apache < 2.4
  58. Allow: from all # For apache < 2.4
  59. Require: all granted # For apache > 2.4.
  60. AllowOverride: None
  61. Formula_Append: |
  62. Additional config as a
  63. multi-line string here
  64. # if template is 'redirect.tmpl'
  65. # RedirectSource: '/'
  66. # RedirectTarget: 'http://www.example.net'
  67. # if template is 'proxy.tmpl'
  68. # ProxyRequests: 'On'
  69. # ProxyPreserveHost: 'On'
  70. # ProxyRoute:
  71. # my sample route:
  72. # ProxyPassSource: '/'
  73. # ProxyPassTarget: 'http://www.example.net'
  74. # ProxyPassTargetOptions: 'connectiontimeout=5 timeout=30'
  75. # ProxyPassReverseSource: '/'
  76. # ProxyPassReverseTarget: 'http://www.example.net'
  77. Alias:
  78. /docs: /usr/share/docs
  79. Location:
  80. /docs:
  81. Order: allow,deny # For Apache < 2.4
  82. Allow: from all # For apache < 2.4
  83. Require: all granted # For apache > 2.4.
  84. Formula_Append: |
  85. Additional config as a
  86. multi-line string here
  87. Formula_Append: |
  88. Additional config as a
  89. multi-line string here
  90. # ``apache.debian_full`` formula additional configuration:
  91. register-site:
  92. # any name as an array index, and you can duplicate this section
  93. UNIQUE_VALUE_HERE:
  94. name: 'my name'
  95. path: 'salt://path/to/sites-available/conf/file'
  96. state: 'enabled'
  97. # Optional - use managed file as Jinja Template
  98. #template: true
  99. #defaults:
  100. # custom_var: "default value"
  101. modules:
  102. enabled: # List modules to enable
  103. - ldap
  104. - ssl
  105. disabled: # List modules to disable
  106. - rewrite
  107. # KeepAlive: Whether or not to allow persistent connections (more than
  108. # one request per connection). Set to "Off" to deactivate.
  109. keepalive: 'On'
  110. security:
  111. # can be Full | OS | Minimal | Minor | Major | Prod
  112. # where Full conveys the most information, and Prod the least.
  113. ServerTokens: Prod
  114. # ``apache.mod_remoteip`` formula additional configuration:
  115. mod_remoteip:
  116. RemoteIPHeader: X-Forwarded-For
  117. RemoteIPTrustedProxy:
  118. - 10.0.8.0/24
  119. - 127.0.0.1
  120. # ``apache.mod_security`` formula additional configuration:
  121. mod_security:
  122. crs_install: True
  123. # If not set, default distro's configuration is installed as is
  124. manage_config: True
  125. sec_rule_engine: 'On'
  126. sec_request_body_access: 'On'
  127. sec_request_body_limit: '14000000'
  128. sec_request_body_no_files_limit: '114002'
  129. sec_request_body_in_memory_limit: '114002'
  130. sec_request_body_limit_action: 'Reject'
  131. sec_pcre_match_limit: '15000'
  132. sec_pcre_match_limit_recursion: '15000'
  133. sec_debug_log_level: '3'