Examples:
Simple configuration proxying “/” but not “/admin”
include apache
apache::vhost { 'basic-proxy-vhost':
}
apache::vhost::proxy { 'proxy-to-backend-server':
vhost => 'basic-proxy-vhost',
proxy_dest => 'http://backend-server/',
no_proxy_uris => '/admin',
}
Granular configuration using ‘Apache::Vhost::ProxyPass` data type
include apache
apache::vhost { 'myvhost':
}
apache::vhost::proxy { 'myvhost-proxy':
vhost => 'myvhost',
proxy_pass => [
{ 'path' => '/a', 'url' => 'http://backend-a/' },
{ 'path' => '/b', 'url' => 'http://backend-b/' },
{ 'path' => '/c', 'url' => 'http://backend-a/c', 'params' => {'max'=>20, 'ttl'=>120, 'retry'=>300}},
{ 'path' => '/l', 'url' => 'http://backend-xy',
'reverse_urls' => ['http://backend-x', 'http://backend-y'] },
{ 'path' => '/d', 'url' => 'http://backend-a/d',
'params' => { 'retry' => 0, 'timeout' => 5 }, },
{ 'path' => '/e', 'url' => 'http://backend-a/e',
'keywords' => ['nocanon', 'interpolate'] },
{ 'path' => '/f', 'url' => 'http://backend-f/',
'setenv' => ['proxy-nokeepalive 1', 'force-proxy-request-1.0 1']},
{ 'path' => '/g', 'url' => 'http://backend-g/',
'reverse_cookies' => [{'path' => '/g', 'url' => 'http://backend-g/',}, {'domain' => 'http://backend-g', 'url' => 'http:://backend-g',},], },
{ 'path' => '/h', 'url' => 'http://backend-h/h',
'no_proxy_uris' => ['/h/admin', '/h/server-status'] },
],
}