mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2024-11-23 00:03:42 +01:00
Added posibility to disable Access log for web-interface containers
This commit is contained in:
commit
c6d63a2863
1
.env_web
1
.env_web
@ -9,6 +9,7 @@ ZBX_SERVER_NAME=Composed installation
|
||||
# ZBX_DB_CIPHER_LIST= # Available since 5.0.0
|
||||
# ZBX_HISTORYSTORAGEURL=http://elasticsearch:9200/ # Available since 3.4.5
|
||||
# ZBX_HISTORYSTORAGETYPES=['uint', 'dbl', 'str', 'text', 'log'] # Available since 3.4.5
|
||||
# ENABLE_WEB_ACCESS_LOG=true
|
||||
# ZBX_MAXEXECUTIONTIME=600
|
||||
# ZBX_MEMORYLIMIT=128M
|
||||
# ZBX_POSTMAXSIZE=16M
|
||||
|
@ -262,6 +262,12 @@ 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*CustomLog)\s+\S+!\1 /dev/null!g' \
|
||||
"/etc/apache2/httpd.conf"
|
||||
fi
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
@ -262,6 +262,12 @@ 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*CustomLog)\s+\S+!\1 /dev/null!g' \
|
||||
"/etc/httpd/conf/httpd.conf"
|
||||
fi
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
@ -255,6 +255,15 @@ 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*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
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
@ -261,11 +261,17 @@ 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*CustomLog)\s+\S+!\1 /dev/null!g' \
|
||||
"/etc/apache2/httpd.conf"
|
||||
fi
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
||||
echo "** Deploying Zabbix web-interface (Apache) with MySQL database"
|
||||
echo "** Deploying Zabbix web-interface (Apache) with PostgreSQL database"
|
||||
|
||||
check_variables
|
||||
check_db_connect
|
||||
|
@ -264,11 +264,17 @@ 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*CustomLog)\s+\S+!\1 /dev/null!g' \
|
||||
"/etc/httpd/conf/httpd.conf"
|
||||
fi
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
||||
echo "** Deploying Zabbix web-interface (Apache) with MySQL database"
|
||||
echo "** Deploying Zabbix web-interface (Apache) with PostgreSQL database"
|
||||
|
||||
check_variables
|
||||
check_db_connect
|
||||
|
@ -266,11 +266,20 @@ 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*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
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
||||
echo "** Deploying Zabbix web-interface (Apache) with MySQL database"
|
||||
echo "** Deploying Zabbix web-interface (Apache) with PostgreSQL database"
|
||||
|
||||
check_variables
|
||||
check_db_connect
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
@ -291,6 +291,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
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
@ -291,6 +291,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
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
@ -287,6 +287,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
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
Loading…
Reference in New Issue
Block a user