Saltstack Official Apache Formula
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

123 行
3.9KB

  1. # server configuration and any vhost configuration have the same data structure
  2. # This data structure is similar to below :
  3. #
  4. # directives: # list of top level directives/values
  5. # - directive_1: value_1
  6. # - directive_2: value_2
  7. # - directive_3: value_3
  8. # containers: # any type of httpd container
  9. # container_name_1: # Files|Directory|DirectoryMatch|Proxy|location|locationMatch ...
  10. # -
  11. # item: 'path/to/1' # label, path or whatever that container applies to
  12. # directives: # list of directives into this container
  13. # - directive_1: value_1
  14. # ...
  15. # -
  16. # item: '/path/to/2'
  17. # direcives:
  18. # - ...
  19. # containers: # nested containers in /path/to/2
  20. # nested_c_1:
  21. # - item: '...'
  22. # directives:
  23. # - ...
  24. # container_name_2:
  25. # -
  26. # item: '...'
  27. # ...
  28. # ``apache`` formula configuration:
  29. apache:
  30. # By default apache restart/reload states run (false skips)
  31. manage_service_states: True
  32. # lookup section overrides ``map.jinja`` values
  33. lookup:
  34. server: apache2
  35. service: apache2
  36. user: some_system_user
  37. group: some_system_group
  38. vhostdir: /etc/apache2/sites-available
  39. confdir: /etc/apache2/conf.d
  40. confext: .conf
  41. logdir: /var/log/apache2
  42. wwwdir: /srv/apache2
  43. # apache version (generally '2.2' or '2.4')
  44. version: '2.2'
  45. # ``apache.mod_wsgi`` formula additional configuration:
  46. mod_wsgi: mod_wsgi
  47. # global (server) apache directives
  48. server_apache_config: # this content will populate httpd.conf
  49. directives:
  50. - AllowEncodedSlashes: 'On'
  51. - Timeout: 5
  52. containers:
  53. IfModule:
  54. -
  55. item: 'mime_module'
  56. directives:
  57. - AddType: 'application/x-font-ttf ttc ttf'
  58. - AddType: 'application/x-font-opentype otf'
  59. - AddType: 'application/x-font-woff woff2'
  60. # ``apache.vhosts.vhost-ng`` formula additional configuration:
  61. VirtualHost:
  62. example.com: # <-- site_name : can be the real ServerName or a virtual name
  63. item: '*:8080' # simple example
  64. directives:
  65. - ServerName: 'example.com' # if not defined default is site_name
  66. - ServerAdmin: 'webmaster@example.com'
  67. - DocumentRoot: '/path/to/www/dir/example.com'
  68. - LogLevel: 'warn'
  69. containers:
  70. Location:
  71. -
  72. item: '/test.html'
  73. directives:
  74. - Require: 'all granted'
  75. my_reverse_proxy: # example with a virtual site_name
  76. item: '*:80' # vhost with proxypass
  77. directives:
  78. - ServerName: 'rp-example.com'
  79. - ServerAdmin: 'webmaster@example.com'
  80. - DocumentRoot: '/path/to/www/dir/rp-example.com'
  81. - LogLevel: 'warn'
  82. - ProxyPass: '/ balancer://cluster_1'
  83. - ProxyPassReverse: '/ balancer://cluster_1'
  84. - ProxyPreserveHost: 'On'
  85. containers:
  86. Proxy:
  87. -
  88. item: 'balancer://cluster_1'
  89. directives:
  90. - BalancerMember: 'http://my_backend_1:8081 route=backend-1-8081 timeout=240 retry=120'
  91. - BalancerMember: 'http://my_backend_2:8081 route=backend-2-8081 timeout=240 retry=120'
  92. - ProxySet: 'stickysession=JSESSIONID|jsessionid nofailover=off maxattempts=1'
  93. unused_vhost:
  94. item: '*:80'
  95. absent: True # Delete this vhost
  96. directives:
  97. - ServerName: 'to-delete-example.com'
  98. - ServerAdmin: 'webmaster@example.com'
  99. - DocumentRoot: '/path/to/www/dir/to-delete-example.com'
  100. - LogLevel: 'warn'
  101. containers:
  102. Location:
  103. -
  104. item: '/test.html'
  105. directives:
  106. - Require: 'all granted'
  107. modules:
  108. enabled: # List modules to enable
  109. - ldap
  110. - ssl
  111. disabled: # List modules to disable
  112. - rewrite