mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2025-01-05 13:19:13 +01:00
Added EXPOSE_WEB_SERVER_INFO variable to control web server / php versions expose
This commit is contained in:
parent
240792fe17
commit
2e7914441c
@ -25,6 +25,8 @@ fi
|
||||
ZABBIX_ETC_DIR="/etc/zabbix"
|
||||
# Web interface www-root directory
|
||||
ZABBIX_WWW_ROOT="/usr/share/zabbix"
|
||||
# Nginx main configuration file
|
||||
NGINX_CONF_FILE="/etc/nginx/nginx.conf"
|
||||
|
||||
# usage: file_env VAR [DEFAULT]
|
||||
# as example: file_env 'MYSQL_PASSWORD' 'zabbix'
|
||||
@ -236,14 +238,23 @@ prepare_zbx_web_config() {
|
||||
if [ "${ENABLE_WEB_ACCESS_LOG,,}" == "false" ]; then
|
||||
sed -ri \
|
||||
-e 's!^(\s*access_log).+\;!\1 off\;!g' \
|
||||
"/etc/nginx/nginx.conf"
|
||||
"$NGINX_CONF_FILE"
|
||||
sed -ri \
|
||||
-e 's!^(\s*access_log).+\;!\1 off\;!g' \
|
||||
"/etc/zabbix/nginx.conf"
|
||||
"$NGINX_CONF_FILE"
|
||||
sed -ri \
|
||||
-e 's!^(\s*access_log).+\;!\1 off\;!g' \
|
||||
"/etc/zabbix/nginx_ssl.conf"
|
||||
"$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
fi
|
||||
|
||||
: ${EXPOSE_WEB_SERVER_INFO:="on"}
|
||||
|
||||
[[ "${EXPOSE_WEB_SERVER_INFO}" != "off" ]] && EXPOSE_WEB_SERVER_INFO="on"
|
||||
|
||||
export EXPOSE_WEB_SERVER_INFO=${EXPOSE_WEB_SERVER_INFO}
|
||||
sed -i \
|
||||
-e "s/{EXPOSE_WEB_SERVER_INFO}/${EXPOSE_WEB_SERVER_INFO}/g" \
|
||||
"$NGINX_CONF_FILE"
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
@ -25,6 +25,8 @@ fi
|
||||
ZABBIX_ETC_DIR="/etc/zabbix"
|
||||
# Web interface www-root directory
|
||||
ZABBIX_WWW_ROOT="/usr/share/zabbix"
|
||||
# Nginx main configuration file
|
||||
NGINX_CONF_FILE="/etc/nginx/nginx.conf"
|
||||
|
||||
# usage: file_env VAR [DEFAULT]
|
||||
# as example: file_env 'MYSQL_PASSWORD' 'zabbix'
|
||||
@ -236,14 +238,23 @@ prepare_zbx_web_config() {
|
||||
if [ "${ENABLE_WEB_ACCESS_LOG,,}" == "false" ]; then
|
||||
sed -ri \
|
||||
-e 's!^(\s*access_log).+\;!\1 off\;!g' \
|
||||
"/etc/nginx/nginx.conf"
|
||||
"$NGINX_CONF_FILE"
|
||||
sed -ri \
|
||||
-e 's!^(\s*access_log).+\;!\1 off\;!g' \
|
||||
"/etc/zabbix/nginx.conf"
|
||||
"$NGINX_CONF_FILE"
|
||||
sed -ri \
|
||||
-e 's!^(\s*access_log).+\;!\1 off\;!g' \
|
||||
"/etc/zabbix/nginx_ssl.conf"
|
||||
"$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
fi
|
||||
|
||||
: ${EXPOSE_WEB_SERVER_INFO:="on"}
|
||||
|
||||
[[ "${EXPOSE_WEB_SERVER_INFO}" != "off" ]] && EXPOSE_WEB_SERVER_INFO="on"
|
||||
|
||||
export EXPOSE_WEB_SERVER_INFO=${EXPOSE_WEB_SERVER_INFO}
|
||||
sed -i \
|
||||
-e "s/{EXPOSE_WEB_SERVER_INFO}/${EXPOSE_WEB_SERVER_INFO}/g" \
|
||||
"$NGINX_CONF_FILE"
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
@ -25,6 +25,8 @@ fi
|
||||
ZABBIX_ETC_DIR="/etc/zabbix"
|
||||
# Web interface www-root directory
|
||||
ZABBIX_WWW_ROOT="/usr/share/zabbix"
|
||||
# Nginx main configuration file
|
||||
NGINX_CONF_FILE="/etc/nginx/nginx.conf"
|
||||
|
||||
# usage: file_env VAR [DEFAULT]
|
||||
# as example: file_env 'MYSQL_PASSWORD' 'zabbix'
|
||||
@ -236,14 +238,23 @@ prepare_zbx_web_config() {
|
||||
if [ "${ENABLE_WEB_ACCESS_LOG,,}" == "false" ]; then
|
||||
sed -ri \
|
||||
-e 's!^(\s*access_log).+\;!\1 off\;!g' \
|
||||
"/etc/nginx/nginx.conf"
|
||||
"$NGINX_CONF_FILE"
|
||||
sed -ri \
|
||||
-e 's!^(\s*access_log).+\;!\1 off\;!g' \
|
||||
"/etc/zabbix/nginx.conf"
|
||||
"$NGINX_CONF_FILE"
|
||||
sed -ri \
|
||||
-e 's!^(\s*access_log).+\;!\1 off\;!g' \
|
||||
"/etc/zabbix/nginx_ssl.conf"
|
||||
"$ZABBIX_ETC_DIR/nginx_ssl.conf"
|
||||
fi
|
||||
|
||||
: ${EXPOSE_WEB_SERVER_INFO:="on"}
|
||||
|
||||
[[ "${EXPOSE_WEB_SERVER_INFO}" != "off" ]] && EXPOSE_WEB_SERVER_INFO="on"
|
||||
|
||||
export EXPOSE_WEB_SERVER_INFO=${EXPOSE_WEB_SERVER_INFO}
|
||||
sed -i \
|
||||
-e "s/{EXPOSE_WEB_SERVER_INFO}/${EXPOSE_WEB_SERVER_INFO}/g" \
|
||||
"$NGINX_CONF_FILE"
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
Loading…
Reference in New Issue
Block a user