# Integration test Apache config — HTTPS + mod-reqin-log

# Load mod-reqin-log
LoadModule reqin_log_module modules/mod_reqin_log.so

# mod_remoteip: trust X-Forwarded-For from Docker internal subnets.
# mod_reqin_log reads r->useragent_ip which mod_remoteip updates,
# so the XFF IP appears as src_ip in the correlated logs.
LoadModule remoteip_module modules/mod_remoteip.so
RemoteIPHeader X-Forwarded-For
RemoteIPInternalProxy 172.0.0.0/8
RemoteIPInternalProxy 192.168.0.0/16
RemoteIPInternalProxy 10.0.0.0/8

# Enable mod-reqin-log with correlator socket
JsonSockLogEnabled On
JsonSockLogSocket "/var/run/logcorrelator/http.socket"
JsonSockLogHeaders X-Request-Id User-Agent Referer X-Forwarded-For \
                   Sec-CH-UA Sec-CH-UA-Mobile Sec-CH-UA-Platform \
                   Sec-Fetch-Dest Sec-Fetch-Mode Sec-Fetch-Site \
                   Accept Accept-Language Accept-Encoding Content-Type
JsonSockLogMaxHeaders 25
JsonSockLogMaxHeaderValueLen 256
JsonSockLogReconnectInterval 5
JsonSockLogErrorReportInterval 5
JsonSockLogLevel DEBUG

# HTTPS virtual host (port 443 already configured by mod_ssl)
<VirtualHost *:80>
    ServerName platform.test
    DocumentRoot /var/www/html

    # Simple test pages
    <Location /health>
        Require all granted
    </Location>
</VirtualHost>
