create_vhost.sh: Add Prosy parameters to vhost configuration.

This commit is contained in:
Christoph 2024-04-24 16:32:59 +02:00
parent 832fe0d2d3
commit 5c9eae7f3e

View File

@ -294,6 +294,34 @@ WEBSITES_ROOT_DIR=""
CREATE_SYMLINK_WEB_BASE_DIR=false
# ---
# - Determin timeout value
# ---
if [[ -f "/usr/local/apache2/conf/httpd.conf" ]]; then
_HTTPD_CONF_FILE="/usr/local/apache2/conf/httpd.conf"
elif [[ -f "/etc/apache2/apache2.conf" ]]; then
_HTTPD_CONF_FILE="/etc/apache2/apache2.conf"
else
_HTTPD_CONF_FILE=''
fi
if [[ -f "${_HTTPD_CONF_FILE}" ]] && $(grep -q -i -E "^\s*Timeout\s+" "${_HTTPD_CONF_FILE}") ; then
_TIMEOUT="$(grep -i -E "^\s*timeout\s+" "${_HTTPD_CONF_FILE}"| awk '{print$2}' | head -1)"
else
_TIMEOUT=60
fi
if [[ -f "${_HTTPD_CONF_FILE}" ]] && $(grep -q -i -E "^\s*ProxyTimeout\s+" "${_HTTPD_CONF_FILE}") ; then
PROXY_TIMEOUT="$(grep -i -E "^\s*ProxyTimeout\s+" "${_HTTPD_CONF_FILE}"| awk '{print$2}' | head -1)"
else
PROXY_TIMEOUT=${_TIMEOUT}
fi
# ---
# - END: Determin timeout value
# ---
# ---
# - Read Configuration File (if exists)
# -
@ -3069,7 +3097,8 @@ elif [ "$_type" = "PHP-FPM" ]; then
# Socket timeout in seconds. The number of seconds Apache httpd waits for data
# sent by / to the backend.
#
ProxySet timeout=30
#ProxySet timeout=${PROXY_TIMEOUT}
</Proxy>
<IfModule dir_module>