|
|
@ -678,9 +678,13 @@ target-get() { |
|
|
|
} |
|
|
|
|
|
|
|
__vhost_proxy_statement() { |
|
|
|
local protocol="$1" cfg="$2" dest="$3" |
|
|
|
local protocol="$1" cfg="$2" dest="$3" proxy_pass_options target |
|
|
|
|
|
|
|
target=$(target-get "$cfg") || return 1 |
|
|
|
proxy_pass_options=($(e "$cfg" | shyaml -y -q get-value apache-proxy-pass-options | yaml_get_values)) |
|
|
|
if [ "${#proxy_pass_options[@]}" == 0 ]; then |
|
|
|
proxy_pass_options=(${proxy_pass_options:-"retry=0"}) |
|
|
|
fi |
|
|
|
|
|
|
|
cat <<EOF |
|
|
|
|
|
|
@ -696,7 +700,7 @@ __vhost_proxy_statement() { |
|
|
|
Allow from all |
|
|
|
</Proxy> |
|
|
|
ProxyVia On |
|
|
|
ProxyPass / http://$target/ retry=0 |
|
|
|
ProxyPass / http://$target/ ${proxy_pass_options[*]} |
|
|
|
<Location / > |
|
|
|
$(__vhost_creds_statement "$cfg" "$dest" | prefix " ") |
|
|
|
ProxyPassReverse / |
|
|
|