mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2024-11-25 09:13:50 +01:00
Fixed Nginx images running under root
This commit is contained in:
parent
48a86dfa8d
commit
cd72f8eef9
@ -1,4 +1,4 @@
|
||||
#user nginx;
|
||||
# user nginx;
|
||||
worker_processes 5;
|
||||
worker_rlimit_nofile 256000;
|
||||
|
||||
|
@ -18,6 +18,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"
|
||||
@ -173,10 +176,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;
|
||||
|
||||
|
@ -18,6 +18,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"
|
||||
@ -173,10 +176,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;
|
||||
|
||||
|
@ -18,6 +18,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"
|
||||
@ -173,10 +176,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;
|
||||
|
||||
|
@ -18,6 +18,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"
|
||||
@ -173,10 +176,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;
|
||||
|
||||
|
@ -18,6 +18,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"
|
||||
@ -173,10 +176,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;
|
||||
|
||||
|
@ -18,6 +18,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"
|
||||
@ -160,10 +163,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;
|
||||
|
||||
|
@ -18,6 +18,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"
|
||||
@ -160,10 +163,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;
|
||||
|
||||
|
@ -18,6 +18,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"
|
||||
@ -160,10 +163,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;
|
||||
|
||||
|
@ -18,6 +18,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"
|
||||
@ -160,10 +163,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;
|
||||
|
||||
|
@ -18,6 +18,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"
|
||||
@ -160,10 +163,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