mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2024-11-24 16:54:13 +01:00
Fixed Nginx images running under root
This commit is contained in:
parent
092a94330c
commit
0e59c8e11f
@ -1,4 +1,4 @@
|
||||
#user nginx;
|
||||
# user nginx;
|
||||
worker_processes 5;
|
||||
worker_rlimit_nofile 256000;
|
||||
|
||||
|
@ -20,6 +20,9 @@ fi
|
||||
# Default timezone for web interface
|
||||
: ${PHP_TZ:="Europe/Riga"}
|
||||
|
||||
# Default user
|
||||
: ${DAEMON_USER:="nginx"}
|
||||
|
||||
# Default directories
|
||||
# Configuration files directory
|
||||
ZABBIX_ETC_DIR="/etc/zabbix"
|
||||
@ -175,10 +178,12 @@ prepare_zbx_web_config() {
|
||||
export PHP_FPM_PM_MAX_REQUESTS=${PHP_FPM_PM_MAX_REQUESTS:-"0"}
|
||||
|
||||
if [ "$(id -u)" == '0' ]; then
|
||||
echo "user = zabbix" >> "$PHP_CONFIG_FILE"
|
||||
echo "group = zabbix" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.owner = nginx" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.group = nginx" >> "$PHP_CONFIG_FILE"
|
||||
sed -i -e "/^[#;] user/s/.*/&\nuser ${DAEMON_USER};/" "$NGINX_CONF_FILE"
|
||||
|
||||
echo "user = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
echo "group = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.owner = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.group = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
fi
|
||||
|
||||
: ${ZBX_DENY_GUI_ACCESS:="false"}
|
||||
|
@ -1,4 +1,4 @@
|
||||
#user nginx;
|
||||
# user nginx;
|
||||
worker_processes 5;
|
||||
worker_rlimit_nofile 256000;
|
||||
|
||||
|
@ -20,6 +20,9 @@ fi
|
||||
# Default timezone for web interface
|
||||
: ${PHP_TZ:="Europe/Riga"}
|
||||
|
||||
# Default user
|
||||
: ${DAEMON_USER:="nginx"}
|
||||
|
||||
# Default directories
|
||||
# Configuration files directory
|
||||
ZABBIX_ETC_DIR="/etc/zabbix"
|
||||
@ -175,10 +178,12 @@ prepare_zbx_web_config() {
|
||||
export PHP_FPM_PM_MAX_REQUESTS=${PHP_FPM_PM_MAX_REQUESTS:-"0"}
|
||||
|
||||
if [ "$(id -u)" == '0' ]; then
|
||||
echo "user = zabbix" >> "$PHP_CONFIG_FILE"
|
||||
echo "group = zabbix" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.owner = nginx" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.group = nginx" >> "$PHP_CONFIG_FILE"
|
||||
sed -i -e "/^[#;] user/s/.*/&\nuser ${DAEMON_USER};/" "$NGINX_CONF_FILE"
|
||||
|
||||
echo "user = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
echo "group = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.owner = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.group = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
fi
|
||||
|
||||
: ${ZBX_DENY_GUI_ACCESS:="false"}
|
||||
|
@ -1,4 +1,4 @@
|
||||
#user nginx;
|
||||
# user nginx;
|
||||
worker_processes 5;
|
||||
worker_rlimit_nofile 256000;
|
||||
|
||||
|
@ -20,6 +20,9 @@ fi
|
||||
# Default timezone for web interface
|
||||
: ${PHP_TZ:="Europe/Riga"}
|
||||
|
||||
# Default user
|
||||
: ${DAEMON_USER:="nginx"}
|
||||
|
||||
# Default directories
|
||||
# Configuration files directory
|
||||
ZABBIX_ETC_DIR="/etc/zabbix"
|
||||
@ -175,10 +178,12 @@ prepare_zbx_web_config() {
|
||||
export PHP_FPM_PM_MAX_REQUESTS=${PHP_FPM_PM_MAX_REQUESTS:-"0"}
|
||||
|
||||
if [ "$(id -u)" == '0' ]; then
|
||||
echo "user = zabbix" >> "$PHP_CONFIG_FILE"
|
||||
echo "group = zabbix" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.owner = nginx" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.group = nginx" >> "$PHP_CONFIG_FILE"
|
||||
sed -i -e "/^[#;] user/s/.*/&\nuser ${DAEMON_USER};/" "$NGINX_CONF_FILE"
|
||||
|
||||
echo "user = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
echo "group = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.owner = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.group = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
fi
|
||||
|
||||
: ${ZBX_DENY_GUI_ACCESS:="false"}
|
||||
|
@ -1,4 +1,4 @@
|
||||
#user nginx;
|
||||
# user nginx;
|
||||
worker_processes 5;
|
||||
worker_rlimit_nofile 256000;
|
||||
|
||||
|
@ -20,6 +20,9 @@ fi
|
||||
# Default timezone for web interface
|
||||
: ${PHP_TZ:="Europe/Riga"}
|
||||
|
||||
# Default user
|
||||
: ${DAEMON_USER:="nginx"}
|
||||
|
||||
# Default directories
|
||||
# Configuration files directory
|
||||
ZABBIX_ETC_DIR="/etc/zabbix"
|
||||
@ -175,10 +178,12 @@ prepare_zbx_web_config() {
|
||||
export PHP_FPM_PM_MAX_REQUESTS=${PHP_FPM_PM_MAX_REQUESTS:-"0"}
|
||||
|
||||
if [ "$(id -u)" == '0' ]; then
|
||||
echo "user = zabbix" >> "$PHP_CONFIG_FILE"
|
||||
echo "group = zabbix" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.owner = nginx" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.group = nginx" >> "$PHP_CONFIG_FILE"
|
||||
sed -i -e "/^[#;] user/s/.*/&\nuser ${DAEMON_USER};/" "$NGINX_CONF_FILE"
|
||||
|
||||
echo "user = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
echo "group = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.owner = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.group = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
fi
|
||||
|
||||
: ${ZBX_DENY_GUI_ACCESS:="false"}
|
||||
|
@ -1,4 +1,4 @@
|
||||
#user nginx;
|
||||
# user www-data;
|
||||
worker_processes 5;
|
||||
worker_rlimit_nofile 256000;
|
||||
|
||||
|
@ -20,6 +20,9 @@ fi
|
||||
# Default timezone for web interface
|
||||
: ${PHP_TZ:="Europe/Riga"}
|
||||
|
||||
# Default user
|
||||
: ${DAEMON_USER:="www-data"}
|
||||
|
||||
# Default directories
|
||||
# Configuration files directory
|
||||
ZABBIX_ETC_DIR="/etc/zabbix"
|
||||
@ -175,10 +178,12 @@ prepare_zbx_web_config() {
|
||||
export PHP_FPM_PM_MAX_REQUESTS=${PHP_FPM_PM_MAX_REQUESTS:-"0"}
|
||||
|
||||
if [ "$(id -u)" == '0' ]; then
|
||||
echo "user = zabbix" >> "$PHP_CONFIG_FILE"
|
||||
echo "group = zabbix" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.owner = nginx" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.group = nginx" >> "$PHP_CONFIG_FILE"
|
||||
sed -i -e "/^[#;] user/s/.*/&\nuser ${DAEMON_USER};/" "$NGINX_CONF_FILE"
|
||||
|
||||
echo "user = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
echo "group = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.owner = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.group = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
fi
|
||||
|
||||
: ${ZBX_DENY_GUI_ACCESS:="false"}
|
||||
|
@ -1,4 +1,4 @@
|
||||
#user nginx;
|
||||
# user nginx;
|
||||
worker_processes 5;
|
||||
worker_rlimit_nofile 256000;
|
||||
|
||||
|
@ -20,6 +20,9 @@ fi
|
||||
# Default timezone for web interface
|
||||
: ${PHP_TZ:="Europe/Riga"}
|
||||
|
||||
# Default user
|
||||
: ${DAEMON_USER:="nginx"}
|
||||
|
||||
# Default directories
|
||||
# Configuration files directory
|
||||
ZABBIX_ETC_DIR="/etc/zabbix"
|
||||
@ -162,10 +165,12 @@ prepare_zbx_web_config() {
|
||||
export PHP_FPM_PM_MAX_REQUESTS=${PHP_FPM_PM_MAX_REQUESTS:-"0"}
|
||||
|
||||
if [ "$(id -u)" == '0' ]; then
|
||||
echo "user = zabbix" >> "$PHP_CONFIG_FILE"
|
||||
echo "group = zabbix" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.owner = nginx" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.group = nginx" >> "$PHP_CONFIG_FILE"
|
||||
sed -i -e "/^[#;] user/s/.*/&\nuser ${DAEMON_USER};/" "$NGINX_CONF_FILE"
|
||||
|
||||
echo "user = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
echo "group = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.owner = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.group = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
fi
|
||||
|
||||
: ${ZBX_DENY_GUI_ACCESS:="false"}
|
||||
|
@ -1,4 +1,4 @@
|
||||
#user nginx;
|
||||
# user nginx;
|
||||
worker_processes 5;
|
||||
worker_rlimit_nofile 256000;
|
||||
|
||||
|
@ -20,6 +20,9 @@ fi
|
||||
# Default timezone for web interface
|
||||
: ${PHP_TZ:="Europe/Riga"}
|
||||
|
||||
# Default user
|
||||
: ${DAEMON_USER:="nginx"}
|
||||
|
||||
# Default directories
|
||||
# Configuration files directory
|
||||
ZABBIX_ETC_DIR="/etc/zabbix"
|
||||
@ -162,10 +165,12 @@ prepare_zbx_web_config() {
|
||||
export PHP_FPM_PM_MAX_REQUESTS=${PHP_FPM_PM_MAX_REQUESTS:-"0"}
|
||||
|
||||
if [ "$(id -u)" == '0' ]; then
|
||||
echo "user = zabbix" >> "$PHP_CONFIG_FILE"
|
||||
echo "group = zabbix" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.owner = nginx" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.group = nginx" >> "$PHP_CONFIG_FILE"
|
||||
sed -i -e "/^[#;] user/s/.*/&\nuser ${DAEMON_USER};/" "$NGINX_CONF_FILE"
|
||||
|
||||
echo "user = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
echo "group = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.owner = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.group = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
fi
|
||||
|
||||
: ${ZBX_DENY_GUI_ACCESS:="false"}
|
||||
|
@ -1,4 +1,4 @@
|
||||
#user nginx;
|
||||
# user nginx;
|
||||
worker_processes 5;
|
||||
worker_rlimit_nofile 256000;
|
||||
|
||||
|
@ -20,6 +20,9 @@ fi
|
||||
# Default timezone for web interface
|
||||
: ${PHP_TZ:="Europe/Riga"}
|
||||
|
||||
# Default user
|
||||
: ${DAEMON_USER:="nginx"}
|
||||
|
||||
# Default directories
|
||||
# Configuration files directory
|
||||
ZABBIX_ETC_DIR="/etc/zabbix"
|
||||
@ -162,10 +165,12 @@ prepare_zbx_web_config() {
|
||||
export PHP_FPM_PM_MAX_REQUESTS=${PHP_FPM_PM_MAX_REQUESTS:-"0"}
|
||||
|
||||
if [ "$(id -u)" == '0' ]; then
|
||||
echo "user = zabbix" >> "$PHP_CONFIG_FILE"
|
||||
echo "group = zabbix" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.owner = nginx" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.group = nginx" >> "$PHP_CONFIG_FILE"
|
||||
sed -i -e "/^[#;] user/s/.*/&\nuser ${DAEMON_USER};/" "$NGINX_CONF_FILE"
|
||||
|
||||
echo "user = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
echo "group = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.owner = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.group = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
fi
|
||||
|
||||
: ${ZBX_DENY_GUI_ACCESS:="false"}
|
||||
|
@ -1,4 +1,4 @@
|
||||
#user nginx;
|
||||
# user www-data;
|
||||
worker_processes 5;
|
||||
worker_rlimit_nofile 256000;
|
||||
|
||||
|
@ -20,6 +20,9 @@ fi
|
||||
# Default timezone for web interface
|
||||
: ${PHP_TZ:="Europe/Riga"}
|
||||
|
||||
# Default user
|
||||
: ${DAEMON_USER:="www-data"}
|
||||
|
||||
# Default directories
|
||||
# Configuration files directory
|
||||
ZABBIX_ETC_DIR="/etc/zabbix"
|
||||
@ -162,10 +165,12 @@ prepare_zbx_web_config() {
|
||||
export PHP_FPM_PM_MAX_REQUESTS=${PHP_FPM_PM_MAX_REQUESTS:-"0"}
|
||||
|
||||
if [ "$(id -u)" == '0' ]; then
|
||||
echo "user = zabbix" >> "$PHP_CONFIG_FILE"
|
||||
echo "group = zabbix" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.owner = nginx" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.group = nginx" >> "$PHP_CONFIG_FILE"
|
||||
sed -i -e "/^[#;] user/s/.*/&\nuser ${DAEMON_USER};/" "$NGINX_CONF_FILE"
|
||||
|
||||
echo "user = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
echo "group = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.owner = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
echo "listen.group = ${DAEMON_USER}" >> "$PHP_CONFIG_FILE"
|
||||
fi
|
||||
|
||||
: ${ZBX_DENY_GUI_ACCESS:="false"}
|
||||
|
Loading…
Reference in New Issue
Block a user