# This is the main Apache HTTP server configuration file.  It contains the
# Set to one of:  Full | OS | Minor | Minimal | Major | Prod
ServerTokens Prod
ServerRoot /etc/apache2
Listen 80

LoadModule mpm_prefork_module /usr/lib/apache2/modules/mod_mpm_prefork.so
LoadModule access_compat_module /usr/lib/apache2/modules/mod_access_compat.so
LoadModule actions_module /usr/lib/apache2/modules/mod_actions.so
LoadModule alias_module /usr/lib/apache2/modules/mod_alias.so
LoadModule allowmethods_module /usr/lib/apache2/modules/mod_allowmethods.so
LoadModule asis_module /usr/lib/apache2/modules/mod_asis.so
LoadModule auth_basic_module /usr/lib/apache2/modules/mod_auth_basic.so
LoadModule auth_digest_module /usr/lib/apache2/modules/mod_auth_digest.so
LoadModule auth_form_module /usr/lib/apache2/modules/mod_auth_form.so
LoadModule authn_anon_module /usr/lib/apache2/modules/mod_authn_anon.so
LoadModule authn_core_module /usr/lib/apache2/modules/mod_authn_core.so
LoadModule authn_dbd_module /usr/lib/apache2/modules/mod_authn_dbd.so
LoadModule authn_dbm_module /usr/lib/apache2/modules/mod_authn_dbm.so
LoadModule authn_file_module /usr/lib/apache2/modules/mod_authn_file.so
LoadModule authn_socache_module /usr/lib/apache2/modules/mod_authn_socache.so
LoadModule authnz_fcgi_module /usr/lib/apache2/modules/mod_authnz_fcgi.so
LoadModule authnz_ldap_module /usr/lib/apache2/modules/mod_authnz_ldap.so
LoadModule authz_core_module /usr/lib/apache2/modules/mod_authz_core.so
LoadModule authz_dbd_module /usr/lib/apache2/modules/mod_authz_dbd.so
LoadModule authz_dbm_module /usr/lib/apache2/modules/mod_authz_dbm.so
LoadModule authz_groupfile_module /usr/lib/apache2/modules/mod_authz_groupfile.so
LoadModule authz_host_module /usr/lib/apache2/modules/mod_authz_host.so
LoadModule authz_owner_module /usr/lib/apache2/modules/mod_authz_owner.so
LoadModule authz_user_module /usr/lib/apache2/modules/mod_authz_user.so
LoadModule autoindex_module /usr/lib/apache2/modules/mod_autoindex.so
LoadModule brotli_module /usr/lib/apache2/modules/mod_brotli.so
LoadModule buffer_module /usr/lib/apache2/modules/mod_buffer.so
LoadModule cache_module /usr/lib/apache2/modules/mod_cache.so
LoadModule cache_disk_module /usr/lib/apache2/modules/mod_cache_disk.so
LoadModule cache_socache_module /usr/lib/apache2/modules/mod_cache_socache.so
LoadModule cern_meta_module /usr/lib/apache2/modules/mod_cern_meta.so
LoadModule cgi_module /usr/lib/apache2/modules/mod_cgi.so
LoadModule cgid_module /usr/lib/apache2/modules/mod_cgid.so
LoadModule charset_lite_module /usr/lib/apache2/modules/mod_charset_lite.so
LoadModule data_module /usr/lib/apache2/modules/mod_data.so
LoadModule dav_module /usr/lib/apache2/modules/mod_dav.so
LoadModule dav_fs_module /usr/lib/apache2/modules/mod_dav_fs.so
LoadModule dav_lock_module /usr/lib/apache2/modules/mod_dav_lock.so
LoadModule dbd_module /usr/lib/apache2/modules/mod_dbd.so
LoadModule deflate_module /usr/lib/apache2/modules/mod_deflate.so
LoadModule dialup_module /usr/lib/apache2/modules/mod_dialup.so
LoadModule dir_module /usr/lib/apache2/modules/mod_dir.so
LoadModule dumpio_module /usr/lib/apache2/modules/mod_dumpio.so
LoadModule echo_module /usr/lib/apache2/modules/mod_echo.so
LoadModule env_module /usr/lib/apache2/modules/mod_env.so
LoadModule expires_module /usr/lib/apache2/modules/mod_expires.so
LoadModule ext_filter_module /usr/lib/apache2/modules/mod_ext_filter.so
LoadModule fcgid_module /usr/lib/apache2/modules/mod_fcgid.so
LoadModule file_cache_module /usr/lib/apache2/modules/mod_file_cache.so
LoadModule filter_module /usr/lib/apache2/modules/mod_filter.so
LoadModule geoip_module /usr/lib/apache2/modules/mod_geoip.so
LoadModule headers_module /usr/lib/apache2/modules/mod_headers.so
LoadModule heartbeat_module /usr/lib/apache2/modules/mod_heartbeat.so
LoadModule heartmonitor_module /usr/lib/apache2/modules/mod_heartmonitor.so
LoadModule http2_module /usr/lib/apache2/modules/mod_http2.so
LoadModule ident_module /usr/lib/apache2/modules/mod_ident.so
LoadModule imagemap_module /usr/lib/apache2/modules/mod_imagemap.so
LoadModule include_module /usr/lib/apache2/modules/mod_include.so
LoadModule info_module /usr/lib/apache2/modules/mod_info.so
LoadModule lbmethod_bybusyness_module /usr/lib/apache2/modules/mod_lbmethod_bybusyness.so
LoadModule lbmethod_byrequests_module /usr/lib/apache2/modules/mod_lbmethod_byrequests.so
LoadModule lbmethod_bytraffic_module /usr/lib/apache2/modules/mod_lbmethod_bytraffic.so
LoadModule lbmethod_heartbeat_module /usr/lib/apache2/modules/mod_lbmethod_heartbeat.so
LoadModule ldap_module /usr/lib/apache2/modules/mod_ldap.so
LoadModule log_debug_module /usr/lib/apache2/modules/mod_log_debug.so
LoadModule log_forensic_module /usr/lib/apache2/modules/mod_log_forensic.so
LoadModule lua_module /usr/lib/apache2/modules/mod_lua.so
LoadModule macro_module /usr/lib/apache2/modules/mod_macro.so
LoadModule md_module /usr/lib/apache2/modules/mod_md.so
LoadModule mime_module /usr/lib/apache2/modules/mod_mime.so
LoadModule mime_magic_module /usr/lib/apache2/modules/mod_mime_magic.so
LoadModule negotiation_module /usr/lib/apache2/modules/mod_negotiation.so
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
LoadModule proxy_ajp_module /usr/lib/apache2/modules/mod_proxy_ajp.so
LoadModule proxy_balancer_module /usr/lib/apache2/modules/mod_proxy_balancer.so
LoadModule proxy_connect_module /usr/lib/apache2/modules/mod_proxy_connect.so
LoadModule proxy_express_module /usr/lib/apache2/modules/mod_proxy_express.so
LoadModule proxy_fcgi_module /usr/lib/apache2/modules/mod_proxy_fcgi.so
LoadModule proxy_fdpass_module /usr/lib/apache2/modules/mod_proxy_fdpass.so
LoadModule proxy_ftp_module /usr/lib/apache2/modules/mod_proxy_ftp.so
LoadModule proxy_hcheck_module /usr/lib/apache2/modules/mod_proxy_hcheck.so
LoadModule proxy_html_module /usr/lib/apache2/modules/mod_proxy_html.so
LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so
LoadModule proxy_http2_module /usr/lib/apache2/modules/mod_proxy_http2.so
LoadModule proxy_scgi_module /usr/lib/apache2/modules/mod_proxy_scgi.so
LoadModule proxy_uwsgi_module /usr/lib/apache2/modules/mod_proxy_uwsgi.so
LoadModule proxy_wstunnel_module /usr/lib/apache2/modules/mod_proxy_wstunnel.so
LoadModule ratelimit_module /usr/lib/apache2/modules/mod_ratelimit.so
LoadModule reflector_module /usr/lib/apache2/modules/mod_reflector.so
LoadModule remoteip_module /usr/lib/apache2/modules/mod_remoteip.so
LoadModule reqtimeout_module /usr/lib/apache2/modules/mod_reqtimeout.so
LoadModule request_module /usr/lib/apache2/modules/mod_request.so
LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so
LoadModule sed_module /usr/lib/apache2/modules/mod_sed.so
LoadModule session_module /usr/lib/apache2/modules/mod_session.so
LoadModule session_cookie_module /usr/lib/apache2/modules/mod_session_cookie.so
LoadModule session_crypto_module /usr/lib/apache2/modules/mod_session_crypto.so
LoadModule session_dbd_module /usr/lib/apache2/modules/mod_session_dbd.so
LoadModule setenvif_module /usr/lib/apache2/modules/mod_setenvif.so
LoadModule slotmem_plain_module /usr/lib/apache2/modules/mod_slotmem_plain.so
LoadModule slotmem_shm_module /usr/lib/apache2/modules/mod_slotmem_shm.so
LoadModule socache_dbm_module /usr/lib/apache2/modules/mod_socache_dbm.so
LoadModule socache_memcache_module /usr/lib/apache2/modules/mod_socache_memcache.so
LoadModule socache_shmcb_module /usr/lib/apache2/modules/mod_socache_shmcb.so
LoadModule speling_module /usr/lib/apache2/modules/mod_speling.so
LoadModule ssl_module /usr/lib/apache2/modules/mod_ssl.so
LoadModule status_module /usr/lib/apache2/modules/mod_status.so
LoadModule substitute_module /usr/lib/apache2/modules/mod_substitute.so
LoadModule suexec_module /usr/lib/apache2/modules/mod_suexec.so
LoadModule unique_id_module /usr/lib/apache2/modules/mod_unique_id.so
LoadModule userdir_module /usr/lib/apache2/modules/mod_userdir.so
LoadModule usertrack_module /usr/lib/apache2/modules/mod_usertrack.so
LoadModule vhost_alias_module /usr/lib/apache2/modules/mod_vhost_alias.so
LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so
LoadModule xml2enc_module /usr/lib/apache2/modules/mod_xml2enc.so

<IfModule unixd_module>
User www-data
Group www-data
</IfModule>

# 'Main' server configuration
ServerName SERVERNAME
ServerAdmin SERVERADMIN@SERVERNAME
ServerSignature On

<Directory />
    AllowOverride none
    Require all denied
</Directory>

<Directory "/data/htdocs">
    Options Indexes FollowSymLinks MultiViews ExecCGI Includes
    AllowOverride All
    Require all granted
</Directory>

<IfModule dir_module>
    DirectoryIndex index.html index.html.var index.php index.cgi index.asp index.aspx index.pl index.aspx Default.aspx default.aspx index.shtml awstats.pl index.unknown.php index.default.php 
</IfModule>

<Files ".ht*">
    Require all denied
</Files>

ErrorLog /var/log/apache2/error.log
LogLevel warn

<IfModule log_config_module>
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
    <IfModule logio_module>
        LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>
    CustomLog /var/log/apache2/access.log combined
</IfModule>

<IfModule alias_module>
    Alias /server-health /data/htdocs/www/server-health
    Alias /server-health.json /data/htdocs/www/server-health.json
    ScriptAlias /cgi-bin/ "/data/htdocs/cgi-bin/"
</IfModule>

<Directory "/data/htdocs/cgi-bin">
    AllowOverride None
    Options ExecCGI
    Require all granted
</Directory>

<IfModule cgid_module>
    #Scriptsock cgisock
</IfModule>

<IfModule headers_module>
    RequestHeader unset Proxy early
</IfModule>

<IfModule mime_module>
    TypesConfig /etc/apache2/mime.types
    AddType application/x-gzip .tgz
    AddEncoding x-compress .Z
    AddEncoding x-gzip .gz .tgz
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
    AddHandler cgi-script .cgi
    AddHandler type-map var
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
    AddType application/x-ns-proxy-autoconfig .dat
</IfModule>

<IfModule mime_magic_module>
    MIMEMagicFile /etc/apache2/magic
</IfModule>

<VirtualHost _default_:80>
DocumentRoot "/data/htdocs/www"
</VirtualHost>
