_configuration.tpl 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. {{- define "webdav.configuration" -}}
  2. {{- include "webdav.validation" $ }}
  3. {{- if ne .Values.webdavConfig.authType "none" }}
  4. secret:
  5. htauth:
  6. enabled: true
  7. data:
  8. htauth: |
  9. {{- include "webdav.htauth" $ | nindent 8 }}
  10. {{- end }}
  11. configmap:
  12. config:
  13. enabled: true
  14. data:
  15. {{- if ne .Values.webdavConfig.authType "none" }}
  16. htauth: |
  17. {{- include "webdav.htauth" $ | nindent 8 }}
  18. {{- end }}
  19. {{- if .Values.webdavNetwork.http }}
  20. webdav.conf: |
  21. {{- include "webdav.http.config" $ | nindent 8 }}
  22. {{- end }}
  23. {{- if .Values.webdavNetwork.https }}
  24. webdav-ssl.conf: |
  25. {{- include "webdav.https.config" $ | nindent 8 }}
  26. {{- end }}
  27. {{- $modulePath := "/usr/local/apache2/modules" }}
  28. httpd.conf: |
  29. # This path is a emptyDir in memory
  30. PidFile "/usr/local/apache2/var/httpd.pid"
  31. # The absolutely necessary modules
  32. LoadModule authn_file_module {{ $modulePath }}/mod_authn_file.so
  33. LoadModule authn_core_module {{ $modulePath }}/mod_authn_core.so
  34. LoadModule authz_user_module {{ $modulePath }}/mod_authz_user.so
  35. LoadModule authz_core_module {{ $modulePath }}/mod_authz_core.so
  36. LoadModule alias_module {{ $modulePath }}/mod_alias.so
  37. LoadModule mpm_event_module {{ $modulePath }}/mod_mpm_event.so
  38. LoadModule auth_basic_module {{ $modulePath }}/mod_auth_basic.so
  39. LoadModule auth_digest_module {{ $modulePath }}/mod_auth_digest.so
  40. LoadModule setenvif_module {{ $modulePath }}/mod_setenvif.so
  41. LoadModule dav_module {{ $modulePath }}/mod_dav.so
  42. LoadModule dav_fs_module {{ $modulePath }}/mod_dav_fs.so
  43. LoadModule allowmethods_module {{ $modulePath }}/mod_allowmethods.so
  44. LoadModule ssl_module {{ $modulePath }}/mod_ssl.so
  45. LoadModule socache_shmcb_module {{ $modulePath }}/mod_socache_shmcb.so
  46. LoadModule unixd_module {{ $modulePath }}/mod_unixd.so
  47. LoadModule rewrite_module {{ $modulePath }}/mod_rewrite.so
  48. # Still deciding whether or not to keep these modules or not
  49. LoadModule authz_host_module {{ $modulePath }}/mod_authz_host.so
  50. LoadModule authz_groupfile_module {{ $modulePath }}/mod_authz_groupfile.so
  51. LoadModule access_compat_module {{ $modulePath }}/mod_access_compat.so
  52. LoadModule reqtimeout_module {{ $modulePath }}/mod_reqtimeout.so
  53. LoadModule filter_module {{ $modulePath }}/mod_filter.so
  54. LoadModule mime_module {{ $modulePath }}/mod_mime.so
  55. LoadModule env_module {{ $modulePath }}/mod_env.so
  56. LoadModule headers_module {{ $modulePath }}/mod_headers.so
  57. LoadModule status_module {{ $modulePath }}/mod_status.so
  58. LoadModule autoindex_module {{ $modulePath }}/mod_autoindex.so
  59. LoadModule dir_module {{ $modulePath }}/mod_dir.so
  60. ServerName localhost
  61. <IfModule dir_module>
  62. DirectoryIndex disabled
  63. </IfModule>
  64. <Files ".ht*">
  65. Require all denied
  66. </Files>
  67. ErrorLog "/proc/self/fd/2"
  68. LogLevel warn
  69. <IfModule log_config_module>
  70. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  71. LogFormat "%h %l %u %t \"%r\" %>s %b" common
  72. <IfModule logio_module>
  73. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
  74. </IfModule>
  75. CustomLog "/proc/self/fd/1" common
  76. </IfModule>
  77. <IfModule alias_module>
  78. ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/"
  79. </IfModule>
  80. <IfModule mime_module>
  81. # TypesConfig points to the file containing the list of mappings from
  82. # filename extension to MIME-type.
  83. TypesConfig /usr/local/apache2/conf/mime.types
  84. # AddType allows you to add to or override the MIME configuration
  85. # file specified in TypesConfig for specific file types.
  86. # AddType application/x-gzip .tgz
  87. # AddEncoding allows you to have certain browsers uncompress
  88. # information on the fly. Note: Not all browsers support this.
  89. # AddEncoding x-compress .Z
  90. # AddEncoding x-gzip .gz .tgz
  91. # If the AddEncoding directives above are commented-out, then you
  92. # probably should define those extensions to indicate media types:
  93. AddType application/x-compress .Z
  94. AddType application/x-gzip .gz .tgz
  95. # AddHandler allows you to map certain file extensions to "handlers":
  96. # actions unrelated to filetype. These can be either built into the server
  97. # or added with the Action directive (see below)
  98. # To use CGI scripts outside of ScriptAliased directories:
  99. # (You will also need to add "ExecCGI" to the "Options" directive.)
  100. # AddHandler cgi-script .cgi
  101. # For type maps (negotiated resources):
  102. # AddHandler type-map var
  103. # Filters allow you to process content before it is sent to the client.
  104. # To parse .shtml files for server-side includes (SSI):
  105. # (You will also need to add "Includes" to the "Options" directive.)
  106. # AddType text/html .shtml
  107. # AddOutputFilter INCLUDES .shtml
  108. </IfModule>
  109. # Secure (SSL/TLS) connections
  110. # Include etc/apache24/extra/httpd-ssl.conf
  111. # Note: The following must must be present to support
  112. # starting without SSL on platforms with no /dev/random equivalent
  113. # but a statically compiled-in mod_ssl.
  114. <IfModule ssl_module>
  115. SSLRandomSeed startup builtin
  116. SSLRandomSeed connect builtin
  117. SSLProtocol +TLSv1.2 +TLSv1.3
  118. </IfModule>
  119. Include /usr/local/apache2/conf/Includes/*.conf
  120. {{- end -}}