mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2025-06-19 17:38:43 +02:00
Added posibility to disable Access log for web-interface containers
This commit is contained in:
parent
00b193ea1e
commit
97bd863323
1
.env_web
1
.env_web
@ -1,6 +1,7 @@
|
||||
# ZBX_SERVER_HOST=zabbix-server
|
||||
# ZBX_SERVER_PORT=10051
|
||||
ZBX_SERVER_NAME=Composed installation
|
||||
# ENABLE_WEB_ACCESS_LOG=true
|
||||
# ZBX_MAXEXECUTIONTIME=600
|
||||
# ZBX_MEMORYLIMIT=128M
|
||||
# ZBX_POSTMAXSIZE=16M
|
||||
|
@ -231,6 +231,12 @@ prepare_zbx_web_config() {
|
||||
-e "s/{ZBX_SERVER_PORT}/${ZBX_SERVER_PORT}/g" \
|
||||
-e "s/{ZBX_SERVER_NAME}/$server_name/g" \
|
||||
"$ZBX_WEB_CONFIG"
|
||||
|
||||
if [ "${ENABLE_WEB_ACCESS_LOG:-"true"}" == "false" ]; then
|
||||
sed -ri \
|
||||
-e 's!^(\s*CustomLog)\s+\S+!\1 /dev/null!g' \
|
||||
"/etc/apache2/httpd.conf"
|
||||
fi
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
@ -231,6 +231,12 @@ prepare_zbx_web_config() {
|
||||
-e "s/{ZBX_SERVER_PORT}/${ZBX_SERVER_PORT}/g" \
|
||||
-e "s/{ZBX_SERVER_NAME}/$server_name/g" \
|
||||
"$ZBX_WEB_CONFIG"
|
||||
|
||||
if [ "${ENABLE_WEB_ACCESS_LOG:-"true"}" == "false" ]; then
|
||||
sed -ri \
|
||||
-e 's!^(\s*CustomLog)\s+\S+!\1 /dev/null!g' \
|
||||
"/etc/httpd/conf/httpd.conf"
|
||||
fi
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
@ -231,6 +231,15 @@ prepare_zbx_web_config() {
|
||||
-e "s/{ZBX_SERVER_PORT}/${ZBX_SERVER_PORT}/g" \
|
||||
-e "s/{ZBX_SERVER_NAME}/$server_name/g" \
|
||||
"$ZBX_WEB_CONFIG"
|
||||
|
||||
if [ "${ENABLE_WEB_ACCESS_LOG:-"true"}" == "false" ]; then
|
||||
sed -ri \
|
||||
-e 's!^(\s*CustomLog)\s+\S+!\1 /dev/null!g' \
|
||||
"/etc/apache2/apache2.conf"
|
||||
sed -ri \
|
||||
-e 's!^(\s*CustomLog)\s+\S+!\1 /dev/null!g' \
|
||||
"/etc/apache2/conf-available/other-vhosts-access-log.conf"
|
||||
fi
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
@ -232,6 +232,12 @@ prepare_zbx_web_config() {
|
||||
-e "s/{ZBX_SERVER_PORT}/${ZBX_SERVER_PORT}/g" \
|
||||
-e "s/{ZBX_SERVER_NAME}/$server_name/g" \
|
||||
"$ZBX_WEB_CONFIG"
|
||||
|
||||
if [ "${ENABLE_WEB_ACCESS_LOG:-"true"}" == "false" ]; then
|
||||
sed -ri \
|
||||
-e 's!^(\s*CustomLog)\s+\S+!\1 /dev/null!g' \
|
||||
"/etc/apache2/httpd.conf"
|
||||
fi
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
@ -233,6 +233,12 @@ prepare_zbx_web_config() {
|
||||
-e "s/{ZBX_SERVER_PORT}/${ZBX_SERVER_PORT}/g" \
|
||||
-e "s/{ZBX_SERVER_NAME}/$server_name/g" \
|
||||
"$ZBX_WEB_CONFIG"
|
||||
|
||||
if [ "${ENABLE_WEB_ACCESS_LOG:-"true"}" == "false" ]; then
|
||||
sed -ri \
|
||||
-e 's!^(\s*CustomLog)\s+\S+!\1 /dev/null!g' \
|
||||
"/etc/httpd/conf/httpd.conf"
|
||||
fi
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
@ -233,6 +233,15 @@ prepare_zbx_web_config() {
|
||||
-e "s/{ZBX_SERVER_PORT}/${ZBX_SERVER_PORT}/g" \
|
||||
-e "s/{ZBX_SERVER_NAME}/$server_name/g" \
|
||||
"$ZBX_WEB_CONFIG"
|
||||
|
||||
if [ "${ENABLE_WEB_ACCESS_LOG:-"true"}" == "false" ]; then
|
||||
sed -ri \
|
||||
-e 's!^(\s*CustomLog)\s+\S+!\1 /dev/null!g' \
|
||||
"/etc/apache2/apache2.conf"
|
||||
sed -ri \
|
||||
-e 's!^(\s*CustomLog)\s+\S+!\1 /dev/null!g' \
|
||||
"/etc/apache2/conf-available/other-vhosts-access-log.conf"
|
||||
fi
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
@ -259,6 +259,18 @@ prepare_zbx_web_config() {
|
||||
-e "s/{ZBX_SERVER_PORT}/${ZBX_SERVER_PORT}/g" \
|
||||
-e "s/{ZBX_SERVER_NAME}/$server_name/g" \
|
||||
"$ZBX_WEB_CONFIG"
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
@ -259,6 +259,18 @@ prepare_zbx_web_config() {
|
||||
-e "s/{ZBX_SERVER_PORT}/${ZBX_SERVER_PORT}/g" \
|
||||
-e "s/{ZBX_SERVER_NAME}/$server_name/g" \
|
||||
"$ZBX_WEB_CONFIG"
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
@ -259,6 +259,18 @@ prepare_zbx_web_config() {
|
||||
-e "s/{ZBX_SERVER_PORT}/${ZBX_SERVER_PORT}/g" \
|
||||
-e "s/{ZBX_SERVER_NAME}/$server_name/g" \
|
||||
"$ZBX_WEB_CONFIG"
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
@ -259,6 +259,18 @@ prepare_zbx_web_config() {
|
||||
-e "s/{ZBX_SERVER_PORT}/${ZBX_SERVER_PORT}/g" \
|
||||
-e "s/{ZBX_SERVER_NAME}/$server_name/g" \
|
||||
"$ZBX_WEB_CONFIG"
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
@ -259,6 +259,18 @@ prepare_zbx_web_config() {
|
||||
-e "s/{ZBX_SERVER_PORT}/${ZBX_SERVER_PORT}/g" \
|
||||
-e "s/{ZBX_SERVER_NAME}/$server_name/g" \
|
||||
"$ZBX_WEB_CONFIG"
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
@ -259,6 +259,18 @@ prepare_zbx_web_config() {
|
||||
-e "s/{ZBX_SERVER_PORT}/${ZBX_SERVER_PORT}/g" \
|
||||
-e "s/{ZBX_SERVER_NAME}/$server_name/g" \
|
||||
"$ZBX_WEB_CONFIG"
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
Loading…
x
Reference in New Issue
Block a user