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.

61 lines
1.8KB

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