httpd.conf 4.9 KB

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