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.

63 line
1.9KB

  1. # ``apache`` formula configuration:
  2. apache:
  3. server: apache2
  4. service: apache2
  5. vhostdir: /etc/apache2/sites-available
  6. confdir: /etc/apache2/conf.d
  7. confext: .conf
  8. logdir: /var/log/apache2
  9. wwwdir: /srv/apache2
  10. # ``apache.mod_wsgi`` formula additional configuration:
  11. apache:
  12. mod_wsgi: mod_wsgi
  13. # ``apache.vhosts`` formula additional configuration:
  14. apache:
  15. sites:
  16. # Default values below are used unless disabled by setting to 'False'.
  17. example.com: # must be unique; used as an ID declaration in Salt; also passed to the template context as {{ id }}
  18. template_file: salt://apache/vhosts/standard.tmpl
  19. template_engine: jinja
  20. interface: '*'
  21. port: '80'
  22. ServerName: {{ id }} # uses the unique ID above unless specified
  23. ServerAlias: www.{{ id }}
  24. ServerAdmin: webmaster@{{ id }}
  25. LogLevel: warn
  26. ErrorLog: {{ logdir }}/{{ id }}-error.log # E.g.: /var/log/apache2/example.com-error.log
  27. CustomLog: {{ logdir }}/{{ id }}-access.log # E.g.: /var/log/apache2/example.com-access.log
  28. DocumentRoot: {{ wwwdir }}/{{ id }} # E.g., /var/www/example.com
  29. Directory:
  30. default: # "default" is a special case; Adds ``{{ wwwdir }}/{{ id }}`` e.g.: /var/www/example.com
  31. Options: -Indexes FollowSymLinks
  32. Order: allow,deny
  33. Allow: from all
  34. AllowOverride: None
  35. Formula_Append: |
  36. Additional config as a
  37. multi-line string here
  38. Formula_Append: |
  39. Additional config as a
  40. multi-line string here
  41. example.net:
  42. template_file: salt://apache/vhosts/minimal.tmpl
  43. # ``apache.debian_full`` formula additional configuration:
  44. apache:
  45. register-site:
  46. # any name as an array index, and you can duplicate this section
  47. {{UNQIUE}}:
  48. name: 'my name'
  49. path: 'salt://path/to/sites-available/conf/file'
  50. state: 'enabled'