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.

пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 9 година
пре 11 година
пре 11 година
пре 11 година
пре 11 година
пре 9 година
пре 9 година
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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. # ``apache.vhosts`` formula additional configuration:
  20. sites:
  21. example.net:
  22. template_file: salt://apache/vhosts/minimal.tmpl
  23. example.com: # must be unique; used as an ID declaration in Salt.
  24. enabled: True
  25. template_file: salt://apache/vhosts/standard.tmpl # or redirect.tmpl or proxy.tmpl
  26. ####################### DEFAULT VALUES BELOW ############################
  27. # NOTE: the values below are simply default settings that *can* be
  28. # overridden and are not required in order to use this formula to create
  29. # vhost entries.
  30. #
  31. # Do not copy the values below into your Pillar unless you intend to
  32. # modify these vaules.
  33. ####################### DEFAULT VALUES BELOW ############################
  34. template_engine: jinja
  35. interface: '*'
  36. port: '80'
  37. ServerName: example.com # uses the unique ID above unless specified
  38. ServerAlias: www.example.com
  39. ServerAdmin: webmaster@example.com
  40. LogLevel: warn
  41. ErrorLog: /path/to/logs/example.com-error.log # E.g.: /var/log/apache2/example.com-error.log
  42. CustomLog: /path/to/logs/example.com-access.log # E.g.: /var/log/apache2/example.com-access.log
  43. DocumentRoot: /path/to/www/dir/example.com # E.g., /var/www/example.com
  44. SSLCertificateFile: /etc/ssl/mycert.pem # if ssl is desired
  45. SSLCertificateKeyFile: /etc/ssl/mycert.pem.key # if key for cert is needed or in an extra file
  46. SSLCertificateChainFile: /etc/ssl/mycert.chain.pem # if you require a chain of server certificates file
  47. Directory:
  48. # "default" is a special case; Adds ``/path/to/www/dir/example.com``
  49. # E.g.: /var/www/example.com
  50. default:
  51. Options: -Indexes FollowSymLinks
  52. Order: allow,deny # For Apache < 2.4
  53. Allow: from all # For apache < 2.4
  54. Require: all granted # For apache > 2.4.
  55. AllowOverride: None
  56. Formula_Append: |
  57. Additional config as a
  58. multi-line string here
  59. # if template is 'redirect.tmpl'
  60. # RedirectSource: '/'
  61. # RedirectTarget: 'http://www.example.net'
  62. # if template is 'proxy.tmpl'
  63. # ProxyPreserveHost: 'On'
  64. # ProxyRoute:
  65. # my sample route:
  66. # ProxyPassSource: '/'
  67. # ProxyPassTarget: 'http://www.example.net'
  68. # ProxyPassReverseSource: '/'
  69. # ProxyPassReverseTarget: 'http://www.example.net'
  70. Alias:
  71. /docs: /usr/share/docs
  72. Location:
  73. /docs:
  74. Order: allow,deny # For Apache < 2.4
  75. Allow: from all # For apache < 2.4
  76. Require: all granted # For apache > 2.4.
  77. Formula_Append: |
  78. Additional config as a
  79. multi-line string here
  80. Formula_Append: |
  81. Additional config as a
  82. multi-line string here
  83. # ``apache.debian_full`` formula additional configuration:
  84. register-site:
  85. # any name as an array index, and you can duplicate this section
  86. UNIQUE_VALUE_HERE:
  87. name: 'my name'
  88. path: 'salt://path/to/sites-available/conf/file'
  89. state: 'enabled'
  90. # Optional - use managed file as Jinja Template
  91. #template: true
  92. #defaults:
  93. # custom_var: "default value"
  94. modules:
  95. enabled: # List modules to enable
  96. - ldap
  97. - ssl
  98. disabled: # List modules to disable
  99. - rewrite
  100. # KeepAlive: Whether or not to allow persistent connections (more than
  101. # one request per connection). Set to "Off" to deactivate.
  102. keepalive: 'On'
  103. security:
  104. # can be Full | OS | Minimal | Minor | Major | Prod
  105. # where Full conveys the most information, and Prod the least.
  106. ServerTokens: Prod
  107. # ``apache.mod_remoteip`` formula additional configuration:
  108. mod_remoteip:
  109. RemoteIPHeader: X-Forwarded-For
  110. RemoteIPTrustedProxy:
  111. - 10.0.8.0/24
  112. - 127.0.0.1