# Get (optional) usp overrides and establish defaults
IncludeOptional usp-overrides.de[f]
<IfDefine !UspModulesDir>
  Define UspModulesDir "/usr/lib64/httpd/modules"
</IfDefine>

# Load required modules, if needed
<IfModule !headers_module>
  LoadModule headers_module "/usr/lib64/httpd/modules/mod_headers.so"
</IfModule>
<IfModule !proxy_module>
  LoadModule proxy_module "/usr/lib64/httpd/modules/mod_proxy.so"
</IfModule>
<IfModule !proxy_http_module>
  LoadModule proxy_http_module "/usr/lib64/httpd/modules/mod_proxy_http.so"
</IfModule>
<IfModule !socache_shmcb_module>
  LoadModule socache_shmcb_module "/usr/lib64/httpd/modules/mod_socache_shmcb.so"
</IfModule>
<IfModule !ssl_module>
  LoadModule ssl_module "/usr/lib64/httpd/modules/mod_ssl.so"
</IfModule>
<IfModule !unified_s3_auth_module>
  LoadModule unified_s3_auth_module "${UspModulesDir}/mod_unified_s3_auth.so"
</IfModule>
<IfModule !unified_remix_module>
  LoadModule unified_remix_module "${UspModulesDir}/mod_unified_remix.so"
</IfModule>

# Enable using subrequests for I/O backend requests by default.
#
# Note that this feature requires mod_proxy and mod_proxy_http. For optimal
# performance, create Proxy sections for each remote storage server. See:
# https://docs.unified-streaming.com/documentation/vod/storage_proxy.html
<Location "/">
  UspEnableSubreq on
</Location>

# Enable proxying (for subrequests) to SSL hosts by default.
SSLProxyEngine on

# Instead of the default proxy worker, you can create additional ones and
# tune them for your own storage backend.
# <Proxy "https://my-bucket.s3-region.amazonaws.com/">
#   ProxySet connectiontimeout=5 timeout=30 ttl=300 keepalive=on retry=0
#   RequestHeader set MyHeader "%D %t"
# </Proxy>
