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.

106 lines
3.5KB

  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. # ``apache.vhosts`` formula additional configuration:
  17. sites:
  18. example.net:
  19. template_file: salt://apache/vhosts/minimal.tmpl
  20. example.com: # must be unique; used as an ID declaration in Salt.
  21. enabled: True
  22. template_file: salt://apache/vhosts/standard.tmpl # or redirect.tmpl or proxy.tmpl
  23. ####################### DEFAULT VALUES BELOW ############################
  24. # NOTE: the values below are simply default settings that *can* be
  25. # overridden and are not required in order to use this formula to create
  26. # vhost entries.
  27. #
  28. # Do not copy the values below into your Pillar unless you intend to
  29. # modify these vaules.
  30. ####################### DEFAULT VALUES BELOW ############################
  31. template_engine: jinja
  32. interface: '*'
  33. port: '80'
  34. ServerName: example.com # uses the unique ID above unless specified
  35. ServerAlias: www.example.com
  36. ServerAdmin: webmaster@example.com
  37. LogLevel: warn
  38. ErrorLog: /path/to/logs/example.com-error.log # E.g.: /var/log/apache2/example.com-error.log
  39. CustomLog: /path/to/logs/example.com-access.log # E.g.: /var/log/apache2/example.com-access.log
  40. DocumentRoot: /path/to/www/dir/example.com # E.g., /var/www/example.com
  41. SSLCertificateFile: /etc/ssl/mycert.pem # if ssl is desired
  42. SSLCertificateKeyFile: /etc/ssl/mycert.pem.key # if key for cert is needed or in an extra file
  43. SSLCertificateChainFile: /etc/ssl/mycert.chain.pem # if you require a chain of server certificates file
  44. Directory:
  45. # "default" is a special case; Adds ``/path/to/www/dir/example.com``
  46. # E.g.: /var/www/example.com
  47. default:
  48. Options: -Indexes FollowSymLinks
  49. Order: allow,deny # For Apache < 2.4
  50. Allow: from all # For apache < 2.4
  51. Require: all granted # For apache > 2.4.
  52. AllowOverride: None
  53. Formula_Append: |
  54. Additional config as a
  55. multi-line string here
  56. # if template is 'redirect.tmpl'
  57. # RedirectSource: '/'
  58. # RedirectTarget: 'http://www.example.net'
  59. # if template is 'proxy.tmpl'
  60. # ProxyPreserveHost: 'On'
  61. # ProxyRoute:
  62. # my sample route:
  63. # ProxyPassSource: '/'
  64. # ProxyPassTarget: 'http://www.example.net'
  65. # ProxyPassReverseSource: '/'
  66. # ProxyPassReverseTarget: 'http://www.example.net'
  67. Formula_Append: |
  68. Additional config as a
  69. multi-line string here
  70. # ``apache.debian_full`` formula additional configuration:
  71. register-site:
  72. # any name as an array index, and you can duplicate this section
  73. UNIQUE_VALUE_HERE:
  74. name: 'my name'
  75. path: 'salt://path/to/sites-available/conf/file'
  76. state: 'enabled'
  77. # Optional - use managed file as Jinja Template
  78. #template: true
  79. #defaults:
  80. # custom_var: "default value"
  81. modules:
  82. enabled: # List modules to enable
  83. - ldap
  84. - ssl
  85. disabled: # List modules to disable
  86. - rewrite