DefaultRuntimeDir ${XDG_RUNTIME_DIR}
PidFile ${XDG_RUNTIME_DIR}/apache2.pid

LoadModule alias_module /usr/lib/apache2/modules/mod_alias.so
LoadModule authz_core_module /usr/lib/apache2/modules/mod_authz_core.so
LoadModule mpm_event_module /usr/lib/apache2/modules/mod_mpm_event.so
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so
LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so
LoadModule ssl_module /usr/lib/apache2/modules/mod_ssl.so

LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined

KeepAlive On
Listen 8090

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

<VirtualHost *:8090>
    ServerName centos-vault-proxy
    SSLProxyEngine On
    CustomLog logs/access.log vhost_combined
    ProxyPass "/" "https://vault.centos.org/"
    ProxyPassReverse "https://vault.centos.org/" "/"
    RedirectMatch "^/(.*)" "http://centos-vault-proxy:8090/$1"
</VirtualHost>

# /usr/sbin/apache2 -d . -f apache_proxy.conf -D FOREGROUND

# vim: syntax=apache
