|
@ -678,9 +678,13 @@ target-get() { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
__vhost_proxy_statement() { |
|
|
__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 |
|
|
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 |
|
|
cat <<EOF |
|
|
|
|
|
|
|
@ -696,7 +700,7 @@ __vhost_proxy_statement() { |
|
|
Allow from all |
|
|
Allow from all |
|
|
</Proxy> |
|
|
</Proxy> |
|
|
ProxyVia On |
|
|
ProxyVia On |
|
|
ProxyPass / http://$target/ retry=0 |
|
|
|
|
|
|
|
|
ProxyPass / http://$target/ ${proxy_pass_options[*]} |
|
|
<Location / > |
|
|
<Location / > |
|
|
$(__vhost_creds_statement "$cfg" "$dest" | prefix " ") |
|
|
$(__vhost_creds_statement "$cfg" "$dest" | prefix " ") |
|
|
ProxyPassReverse / |
|
|
ProxyPassReverse / |
|
|