mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2025-08-09 16:45:05 +02:00
Added posibility to disable Access log for web-interface containers
This commit is contained in:
@ -290,6 +290,18 @@ prepare_zbx_web_config() {
|
||||
sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "/tmp/defines.inc.php_tmp" > "$ZBX_WWW_ROOT/include/defines.inc.php"
|
||||
rm -f "/tmp/defines.inc.php_tmp"
|
||||
fi
|
||||
|
||||
if [ "${ENABLE_WEB_ACCESS_LOG:-"true"}" == "false" ]; then
|
||||
sed -ri \
|
||||
-e 's!^(\s*access_log).+\;!\1 off\;!g' \
|
||||
"/etc/nginx/nginx.conf"
|
||||
sed -ri \
|
||||
-e 's!^(\s*access_log).+\;!\1 off\;!g' \
|
||||
"/etc/zabbix/nginx.conf"
|
||||
sed -ri \
|
||||
-e 's!^(\s*access_log).+\;!\1 off\;!g' \
|
||||
"/etc/zabbix/nginx_ssl.conf"
|
||||
fi
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
@ -290,6 +290,18 @@ prepare_zbx_web_config() {
|
||||
sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "/tmp/defines.inc.php_tmp" > "$ZBX_WWW_ROOT/include/defines.inc.php"
|
||||
rm -f "/tmp/defines.inc.php_tmp"
|
||||
fi
|
||||
|
||||
if [ "${ENABLE_WEB_ACCESS_LOG:-"true"}" == "false" ]; then
|
||||
sed -ri \
|
||||
-e 's!^(\s*access_log).+\;!\1 off\;!g' \
|
||||
"/etc/nginx/nginx.conf"
|
||||
sed -ri \
|
||||
-e 's!^(\s*access_log).+\;!\1 off\;!g' \
|
||||
"/etc/zabbix/nginx.conf"
|
||||
sed -ri \
|
||||
-e 's!^(\s*access_log).+\;!\1 off\;!g' \
|
||||
"/etc/zabbix/nginx_ssl.conf"
|
||||
fi
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
@ -282,6 +282,18 @@ prepare_zbx_web_config() {
|
||||
sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "/tmp/defines.inc.php_tmp" > "$ZBX_WWW_ROOT/include/defines.inc.php"
|
||||
rm -f "/tmp/defines.inc.php_tmp"
|
||||
fi
|
||||
|
||||
if [ "${ENABLE_WEB_ACCESS_LOG:-"true"}" == "false" ]; then
|
||||
sed -ri \
|
||||
-e 's!^(\s*access_log).+\;!\1 off\;!g' \
|
||||
"/etc/nginx/nginx.conf"
|
||||
sed -ri \
|
||||
-e 's!^(\s*access_log).+\;!\1 off\;!g' \
|
||||
"/etc/zabbix/nginx.conf"
|
||||
sed -ri \
|
||||
-e 's!^(\s*access_log).+\;!\1 off\;!g' \
|
||||
"/etc/zabbix/nginx_ssl.conf"
|
||||
fi
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
Reference in New Issue
Block a user