# Test config with:
# apache2 -d "${PWD}" -f "${PWD}/apache-2.2-forward-proxy.conf" -E /dev/stderr -t
#
# Run with:
# apache2 -d ${PWD} -f ${PWD}/apache-2.2-forward-proxy.conf -E /dev/stderr
#
#---------------------------------------------------------------------------
Listen 127.0.0.1:3128

# Access control functionality
LoadModule authz_host_module /usr/lib/apache2/modules/mod_authz_host.so

# Proxy functionality
LoadModule proxy_module         /usr/lib/apache2/modules/mod_proxy.so
LoadModule proxy_http_module    /usr/lib/apache2/modules/mod_proxy_http.so
LoadModule proxy_connect_module /usr/lib/apache2/modules/mod_proxy_connect.so

# Logging
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogLevel warn
ErrorLog  logs/error.log
CustomLog logs/access.log combined

# PID file
PidFile   logs/apache2.pid

# Forward Proxy
ProxyRequests On

# Allow CONNECT (and thus HTTPS) to additional ports
AllowCONNECT 443 563 8080

<Proxy *>
    Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1
</Proxy>
