diff --git a/Dockerfiles/web-apache-mysql/README.md b/Dockerfiles/web-apache-mysql/README.md index 080917b2d..45a88a642 100644 --- a/Dockerfiles/web-apache-mysql/README.md +++ b/Dockerfiles/web-apache-mysql/README.md @@ -136,6 +136,10 @@ Use IEEE754 compatible value range for 64-bit Numeric (float) history values. Av The variable sets the Access Log directive for Web-server. By default, value corresponds to standard output. +### `HTTP_INDEX_FILE` + +The variable controls default index page. By default, `index.php`. + ### `ZBX_MAXEXECUTIONTIME` The varable is PHP ``max_execution_time`` option. By default, value is `300`. diff --git a/Dockerfiles/web-apache-mysql/alpine/conf/etc/zabbix/apache.conf b/Dockerfiles/web-apache-mysql/alpine/conf/etc/zabbix/apache.conf index 2c55ebca2..b32e8167f 100644 --- a/Dockerfiles/web-apache-mysql/alpine/conf/etc/zabbix/apache.conf +++ b/Dockerfiles/web-apache-mysql/alpine/conf/etc/zabbix/apache.conf @@ -1,7 +1,7 @@ DocumentRoot /usr/share/zabbix/ ServerName zabbix - DirectoryIndex index.php + DirectoryIndex {HTTP_INDEX_FILE} AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml AddType application/x-httpd-php-source .phps diff --git a/Dockerfiles/web-apache-mysql/alpine/conf/etc/zabbix/apache_ssl.conf b/Dockerfiles/web-apache-mysql/alpine/conf/etc/zabbix/apache_ssl.conf index 2cffba707..91b8a7dde 100644 --- a/Dockerfiles/web-apache-mysql/alpine/conf/etc/zabbix/apache_ssl.conf +++ b/Dockerfiles/web-apache-mysql/alpine/conf/etc/zabbix/apache_ssl.conf @@ -7,7 +7,7 @@ Listen 8443 DocumentRoot /usr/share/zabbix/ ServerName zabbix - DirectoryIndex index.php + DirectoryIndex {HTTP_INDEX_FILE} AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml AddType application/x-httpd-php-source .phps diff --git a/Dockerfiles/web-apache-mysql/alpine/docker-entrypoint.sh b/Dockerfiles/web-apache-mysql/alpine/docker-entrypoint.sh index 68ac3e482..d6e34596f 100755 --- a/Dockerfiles/web-apache-mysql/alpine/docker-entrypoint.sh +++ b/Dockerfiles/web-apache-mysql/alpine/docker-entrypoint.sh @@ -202,6 +202,17 @@ prepare_zbx_web_config() { rm -f "/tmp/defines.inc.php_tmp" fi + : ${HTTP_INDEX_FILE:="index.php"} + sed -i \ + -e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \ + "$ZABBIX_ETC_DIR/apache.conf" + + if [ -f "$ZABBIX_ETC_DIR/apache_ssl.conf" ]; then + sed -i \ + -e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \ + "$ZABBIX_ETC_DIR/apache_ssl.conff" + fi + : ${ENABLE_WEB_ACCESS_LOG:="true"} if [ "${ENABLE_WEB_ACCESS_LOG,,}" == "false" ]; then diff --git a/Dockerfiles/web-apache-mysql/centos/conf/etc/zabbix/apache.conf b/Dockerfiles/web-apache-mysql/centos/conf/etc/zabbix/apache.conf index 9594762ba..e696330bf 100644 --- a/Dockerfiles/web-apache-mysql/centos/conf/etc/zabbix/apache.conf +++ b/Dockerfiles/web-apache-mysql/centos/conf/etc/zabbix/apache.conf @@ -1,7 +1,7 @@ DocumentRoot /usr/share/zabbix/ ServerName zabbix - DirectoryIndex index.php + DirectoryIndex {HTTP_INDEX_FILE} AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml AddType application/x-httpd-php-source .phps diff --git a/Dockerfiles/web-apache-mysql/centos/conf/etc/zabbix/apache_ssl.conf b/Dockerfiles/web-apache-mysql/centos/conf/etc/zabbix/apache_ssl.conf index e081fccdb..9b1685c7c 100644 --- a/Dockerfiles/web-apache-mysql/centos/conf/etc/zabbix/apache_ssl.conf +++ b/Dockerfiles/web-apache-mysql/centos/conf/etc/zabbix/apache_ssl.conf @@ -6,7 +6,7 @@ Listen 8443 DocumentRoot /usr/share/zabbix/ ServerName zabbix - DirectoryIndex index.php + DirectoryIndex {HTTP_INDEX_FILE} AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml AddType application/x-httpd-php-source .phps diff --git a/Dockerfiles/web-apache-mysql/centos/docker-entrypoint.sh b/Dockerfiles/web-apache-mysql/centos/docker-entrypoint.sh index 7cbc825e4..999d22ff7 100755 --- a/Dockerfiles/web-apache-mysql/centos/docker-entrypoint.sh +++ b/Dockerfiles/web-apache-mysql/centos/docker-entrypoint.sh @@ -218,6 +218,17 @@ prepare_zbx_web_config() { rm -f "/tmp/defines.inc.php_tmp" fi + : ${HTTP_INDEX_FILE:="index.php"} + sed -i \ + -e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \ + "$ZABBIX_ETC_DIR/apache.conf" + + if [ -f "$ZABBIX_ETC_DIR/apache_ssl.conf" ]; then + sed -i \ + -e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \ + "$ZABBIX_ETC_DIR/apache_ssl.conff" + fi + : ${ENABLE_WEB_ACCESS_LOG:="true"} if [ "${ENABLE_WEB_ACCESS_LOG,,}" == "false" ]; then diff --git a/Dockerfiles/web-apache-mysql/ol/conf/etc/zabbix/apache.conf b/Dockerfiles/web-apache-mysql/ol/conf/etc/zabbix/apache.conf index 9594762ba..e696330bf 100644 --- a/Dockerfiles/web-apache-mysql/ol/conf/etc/zabbix/apache.conf +++ b/Dockerfiles/web-apache-mysql/ol/conf/etc/zabbix/apache.conf @@ -1,7 +1,7 @@ DocumentRoot /usr/share/zabbix/ ServerName zabbix - DirectoryIndex index.php + DirectoryIndex {HTTP_INDEX_FILE} AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml AddType application/x-httpd-php-source .phps diff --git a/Dockerfiles/web-apache-mysql/ol/conf/etc/zabbix/apache_ssl.conf b/Dockerfiles/web-apache-mysql/ol/conf/etc/zabbix/apache_ssl.conf index e081fccdb..9b1685c7c 100644 --- a/Dockerfiles/web-apache-mysql/ol/conf/etc/zabbix/apache_ssl.conf +++ b/Dockerfiles/web-apache-mysql/ol/conf/etc/zabbix/apache_ssl.conf @@ -6,7 +6,7 @@ Listen 8443 DocumentRoot /usr/share/zabbix/ ServerName zabbix - DirectoryIndex index.php + DirectoryIndex {HTTP_INDEX_FILE} AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml AddType application/x-httpd-php-source .phps diff --git a/Dockerfiles/web-apache-mysql/ol/docker-entrypoint.sh b/Dockerfiles/web-apache-mysql/ol/docker-entrypoint.sh index 7cbc825e4..999d22ff7 100755 --- a/Dockerfiles/web-apache-mysql/ol/docker-entrypoint.sh +++ b/Dockerfiles/web-apache-mysql/ol/docker-entrypoint.sh @@ -218,6 +218,17 @@ prepare_zbx_web_config() { rm -f "/tmp/defines.inc.php_tmp" fi + : ${HTTP_INDEX_FILE:="index.php"} + sed -i \ + -e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \ + "$ZABBIX_ETC_DIR/apache.conf" + + if [ -f "$ZABBIX_ETC_DIR/apache_ssl.conf" ]; then + sed -i \ + -e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \ + "$ZABBIX_ETC_DIR/apache_ssl.conff" + fi + : ${ENABLE_WEB_ACCESS_LOG:="true"} if [ "${ENABLE_WEB_ACCESS_LOG,,}" == "false" ]; then diff --git a/Dockerfiles/web-apache-mysql/ubuntu/conf/etc/zabbix/apache.conf b/Dockerfiles/web-apache-mysql/ubuntu/conf/etc/zabbix/apache.conf index 2c55ebca2..b32e8167f 100644 --- a/Dockerfiles/web-apache-mysql/ubuntu/conf/etc/zabbix/apache.conf +++ b/Dockerfiles/web-apache-mysql/ubuntu/conf/etc/zabbix/apache.conf @@ -1,7 +1,7 @@ DocumentRoot /usr/share/zabbix/ ServerName zabbix - DirectoryIndex index.php + DirectoryIndex {HTTP_INDEX_FILE} AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml AddType application/x-httpd-php-source .phps diff --git a/Dockerfiles/web-apache-mysql/ubuntu/conf/etc/zabbix/apache_ssl.conf b/Dockerfiles/web-apache-mysql/ubuntu/conf/etc/zabbix/apache_ssl.conf index 2c956fec1..b60e34bae 100644 --- a/Dockerfiles/web-apache-mysql/ubuntu/conf/etc/zabbix/apache_ssl.conf +++ b/Dockerfiles/web-apache-mysql/ubuntu/conf/etc/zabbix/apache_ssl.conf @@ -6,7 +6,7 @@ LoadModule headers_module /usr/lib/apache2/modules/mod_headers.so DocumentRoot /usr/share/zabbix/ ServerName zabbix - DirectoryIndex index.php + DirectoryIndex {HTTP_INDEX_FILE} AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml AddType application/x-httpd-php-source .phps diff --git a/Dockerfiles/web-apache-mysql/ubuntu/docker-entrypoint.sh b/Dockerfiles/web-apache-mysql/ubuntu/docker-entrypoint.sh index 91aa89232..e6ffbe205 100755 --- a/Dockerfiles/web-apache-mysql/ubuntu/docker-entrypoint.sh +++ b/Dockerfiles/web-apache-mysql/ubuntu/docker-entrypoint.sh @@ -202,6 +202,17 @@ prepare_zbx_web_config() { rm -f "/tmp/defines.inc.php_tmp" fi + : ${HTTP_INDEX_FILE:="index.php"} + sed -i \ + -e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \ + "$ZABBIX_ETC_DIR/apache.conf" + + if [ -f "$ZABBIX_ETC_DIR/apache_ssl.conf" ]; then + sed -i \ + -e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \ + "$ZABBIX_ETC_DIR/apache_ssl.conff" + fi + : ${ENABLE_WEB_ACCESS_LOG:="true"} if [ "${ENABLE_WEB_ACCESS_LOG,,}" == "false" ]; then diff --git a/Dockerfiles/web-apache-pgsql/README.md b/Dockerfiles/web-apache-pgsql/README.md index ea6f7bdb1..d295ab021 100644 --- a/Dockerfiles/web-apache-pgsql/README.md +++ b/Dockerfiles/web-apache-pgsql/README.md @@ -140,6 +140,10 @@ Use IEEE754 compatible value range for 64-bit Numeric (float) history values. Av The variable sets the Access Log directive for Web-server. By default, value corresponds to standard output. +### `HTTP_INDEX_FILE` + +The variable controls default index page. By default, `index.php`. + ### `ZBX_MAXEXECUTIONTIME` The varable is PHP ``max_execution_time`` option. By default, value is `300`. diff --git a/Dockerfiles/web-apache-pgsql/alpine/conf/etc/zabbix/apache.conf b/Dockerfiles/web-apache-pgsql/alpine/conf/etc/zabbix/apache.conf index 2c55ebca2..b32e8167f 100644 --- a/Dockerfiles/web-apache-pgsql/alpine/conf/etc/zabbix/apache.conf +++ b/Dockerfiles/web-apache-pgsql/alpine/conf/etc/zabbix/apache.conf @@ -1,7 +1,7 @@ DocumentRoot /usr/share/zabbix/ ServerName zabbix - DirectoryIndex index.php + DirectoryIndex {HTTP_INDEX_FILE} AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml AddType application/x-httpd-php-source .phps diff --git a/Dockerfiles/web-apache-pgsql/alpine/conf/etc/zabbix/apache_ssl.conf b/Dockerfiles/web-apache-pgsql/alpine/conf/etc/zabbix/apache_ssl.conf index 2cffba707..91b8a7dde 100644 --- a/Dockerfiles/web-apache-pgsql/alpine/conf/etc/zabbix/apache_ssl.conf +++ b/Dockerfiles/web-apache-pgsql/alpine/conf/etc/zabbix/apache_ssl.conf @@ -7,7 +7,7 @@ Listen 8443 DocumentRoot /usr/share/zabbix/ ServerName zabbix - DirectoryIndex index.php + DirectoryIndex {HTTP_INDEX_FILE} AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml AddType application/x-httpd-php-source .phps diff --git a/Dockerfiles/web-apache-pgsql/alpine/docker-entrypoint.sh b/Dockerfiles/web-apache-pgsql/alpine/docker-entrypoint.sh index 3349c5e71..56b8bf845 100755 --- a/Dockerfiles/web-apache-pgsql/alpine/docker-entrypoint.sh +++ b/Dockerfiles/web-apache-pgsql/alpine/docker-entrypoint.sh @@ -189,6 +189,17 @@ prepare_zbx_web_config() { rm -f "/tmp/defines.inc.php_tmp" fi + : ${HTTP_INDEX_FILE:="index.php"} + sed -i \ + -e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \ + "$ZABBIX_ETC_DIR/apache.conf" + + if [ -f "$ZABBIX_ETC_DIR/apache_ssl.conf" ]; then + sed -i \ + -e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \ + "$ZABBIX_ETC_DIR/apache_ssl.conff" + fi + : ${ENABLE_WEB_ACCESS_LOG:="true"} if [ "${ENABLE_WEB_ACCESS_LOG,,}" == "false" ]; then diff --git a/Dockerfiles/web-apache-pgsql/centos/conf/etc/zabbix/apache.conf b/Dockerfiles/web-apache-pgsql/centos/conf/etc/zabbix/apache.conf index 9594762ba..e696330bf 100644 --- a/Dockerfiles/web-apache-pgsql/centos/conf/etc/zabbix/apache.conf +++ b/Dockerfiles/web-apache-pgsql/centos/conf/etc/zabbix/apache.conf @@ -1,7 +1,7 @@ DocumentRoot /usr/share/zabbix/ ServerName zabbix - DirectoryIndex index.php + DirectoryIndex {HTTP_INDEX_FILE} AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml AddType application/x-httpd-php-source .phps diff --git a/Dockerfiles/web-apache-pgsql/centos/conf/etc/zabbix/apache_ssl.conf b/Dockerfiles/web-apache-pgsql/centos/conf/etc/zabbix/apache_ssl.conf index e081fccdb..9b1685c7c 100644 --- a/Dockerfiles/web-apache-pgsql/centos/conf/etc/zabbix/apache_ssl.conf +++ b/Dockerfiles/web-apache-pgsql/centos/conf/etc/zabbix/apache_ssl.conf @@ -6,7 +6,7 @@ Listen 8443 DocumentRoot /usr/share/zabbix/ ServerName zabbix - DirectoryIndex index.php + DirectoryIndex {HTTP_INDEX_FILE} AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml AddType application/x-httpd-php-source .phps diff --git a/Dockerfiles/web-apache-pgsql/centos/docker-entrypoint.sh b/Dockerfiles/web-apache-pgsql/centos/docker-entrypoint.sh index be1dc4d6b..16a9eacb3 100755 --- a/Dockerfiles/web-apache-pgsql/centos/docker-entrypoint.sh +++ b/Dockerfiles/web-apache-pgsql/centos/docker-entrypoint.sh @@ -205,6 +205,17 @@ prepare_zbx_web_config() { rm -f "/tmp/defines.inc.php_tmp" fi + : ${HTTP_INDEX_FILE:="index.php"} + sed -i \ + -e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \ + "$ZABBIX_ETC_DIR/apache.conf" + + if [ -f "$ZABBIX_ETC_DIR/apache_ssl.conf" ]; then + sed -i \ + -e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \ + "$ZABBIX_ETC_DIR/apache_ssl.conff" + fi + : ${ENABLE_WEB_ACCESS_LOG:="true"} if [ "${ENABLE_WEB_ACCESS_LOG,,}" == "false" ]; then diff --git a/Dockerfiles/web-apache-pgsql/ol/conf/etc/zabbix/apache.conf b/Dockerfiles/web-apache-pgsql/ol/conf/etc/zabbix/apache.conf index 9594762ba..e696330bf 100644 --- a/Dockerfiles/web-apache-pgsql/ol/conf/etc/zabbix/apache.conf +++ b/Dockerfiles/web-apache-pgsql/ol/conf/etc/zabbix/apache.conf @@ -1,7 +1,7 @@ DocumentRoot /usr/share/zabbix/ ServerName zabbix - DirectoryIndex index.php + DirectoryIndex {HTTP_INDEX_FILE} AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml AddType application/x-httpd-php-source .phps diff --git a/Dockerfiles/web-apache-pgsql/ol/conf/etc/zabbix/apache_ssl.conf b/Dockerfiles/web-apache-pgsql/ol/conf/etc/zabbix/apache_ssl.conf index e081fccdb..9b1685c7c 100644 --- a/Dockerfiles/web-apache-pgsql/ol/conf/etc/zabbix/apache_ssl.conf +++ b/Dockerfiles/web-apache-pgsql/ol/conf/etc/zabbix/apache_ssl.conf @@ -6,7 +6,7 @@ Listen 8443 DocumentRoot /usr/share/zabbix/ ServerName zabbix - DirectoryIndex index.php + DirectoryIndex {HTTP_INDEX_FILE} AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml AddType application/x-httpd-php-source .phps diff --git a/Dockerfiles/web-apache-pgsql/ol/docker-entrypoint.sh b/Dockerfiles/web-apache-pgsql/ol/docker-entrypoint.sh index be1dc4d6b..16a9eacb3 100755 --- a/Dockerfiles/web-apache-pgsql/ol/docker-entrypoint.sh +++ b/Dockerfiles/web-apache-pgsql/ol/docker-entrypoint.sh @@ -205,6 +205,17 @@ prepare_zbx_web_config() { rm -f "/tmp/defines.inc.php_tmp" fi + : ${HTTP_INDEX_FILE:="index.php"} + sed -i \ + -e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \ + "$ZABBIX_ETC_DIR/apache.conf" + + if [ -f "$ZABBIX_ETC_DIR/apache_ssl.conf" ]; then + sed -i \ + -e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \ + "$ZABBIX_ETC_DIR/apache_ssl.conff" + fi + : ${ENABLE_WEB_ACCESS_LOG:="true"} if [ "${ENABLE_WEB_ACCESS_LOG,,}" == "false" ]; then diff --git a/Dockerfiles/web-apache-pgsql/ubuntu/conf/etc/zabbix/apache.conf b/Dockerfiles/web-apache-pgsql/ubuntu/conf/etc/zabbix/apache.conf index 2c55ebca2..b32e8167f 100644 --- a/Dockerfiles/web-apache-pgsql/ubuntu/conf/etc/zabbix/apache.conf +++ b/Dockerfiles/web-apache-pgsql/ubuntu/conf/etc/zabbix/apache.conf @@ -1,7 +1,7 @@ DocumentRoot /usr/share/zabbix/ ServerName zabbix - DirectoryIndex index.php + DirectoryIndex {HTTP_INDEX_FILE} AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml AddType application/x-httpd-php-source .phps diff --git a/Dockerfiles/web-apache-pgsql/ubuntu/conf/etc/zabbix/apache_ssl.conf b/Dockerfiles/web-apache-pgsql/ubuntu/conf/etc/zabbix/apache_ssl.conf index 2c956fec1..b60e34bae 100644 --- a/Dockerfiles/web-apache-pgsql/ubuntu/conf/etc/zabbix/apache_ssl.conf +++ b/Dockerfiles/web-apache-pgsql/ubuntu/conf/etc/zabbix/apache_ssl.conf @@ -6,7 +6,7 @@ LoadModule headers_module /usr/lib/apache2/modules/mod_headers.so DocumentRoot /usr/share/zabbix/ ServerName zabbix - DirectoryIndex index.php + DirectoryIndex {HTTP_INDEX_FILE} AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml AddType application/x-httpd-php-source .phps diff --git a/Dockerfiles/web-apache-pgsql/ubuntu/docker-entrypoint.sh b/Dockerfiles/web-apache-pgsql/ubuntu/docker-entrypoint.sh index d21d8a06a..8ba292afe 100755 --- a/Dockerfiles/web-apache-pgsql/ubuntu/docker-entrypoint.sh +++ b/Dockerfiles/web-apache-pgsql/ubuntu/docker-entrypoint.sh @@ -193,6 +193,17 @@ prepare_zbx_web_config() { rm -f "/tmp/defines.inc.php_tmp" fi + : ${HTTP_INDEX_FILE:="index.php"} + sed -i \ + -e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \ + "$ZABBIX_ETC_DIR/apache.conf" + + if [ -f "$ZABBIX_ETC_DIR/apache_ssl.conf" ]; then + sed -i \ + -e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \ + "$ZABBIX_ETC_DIR/apache_ssl.conff" + fi + : ${ENABLE_WEB_ACCESS_LOG:="true"} if [ "${ENABLE_WEB_ACCESS_LOG,,}" == "false" ]; then diff --git a/Dockerfiles/web-nginx-mysql/README.md b/Dockerfiles/web-nginx-mysql/README.md index df2a6a684..a6104c67f 100644 --- a/Dockerfiles/web-nginx-mysql/README.md +++ b/Dockerfiles/web-nginx-mysql/README.md @@ -137,6 +137,10 @@ Use IEEE754 compatible value range for 64-bit Numeric (float) history values. Av The variable sets the Access Log directive for Web-server. By default, value corresponds to standard output. +### `HTTP_INDEX_FILE` + +The variable controls default index page. By default, `index.php`. + ### `ZBX_MAXEXECUTIONTIME` The varable is PHP ``max_execution_time`` option. By default, value is `300`. diff --git a/Dockerfiles/web-nginx-mysql/alpine/conf/etc/zabbix/nginx.conf b/Dockerfiles/web-nginx-mysql/alpine/conf/etc/zabbix/nginx.conf index d9d8a743a..8de1ca686 100644 --- a/Dockerfiles/web-nginx-mysql/alpine/conf/etc/zabbix/nginx.conf +++ b/Dockerfiles/web-nginx-mysql/alpine/conf/etc/zabbix/nginx.conf @@ -3,7 +3,7 @@ server { listen [::]:8080; server_name zabbix; - index index.php; + index {HTTP_INDEX_FILE}; access_log /var/log/nginx/access.log main; error_log /var/log/nginx/error.log notice; @@ -51,7 +51,6 @@ server { fastcgi_pass unix:/tmp/php-fpm.sock; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; - fastcgi_index index.php; include fastcgi_params; } @@ -61,7 +60,7 @@ server { location ~ .php$ { fastcgi_pass unix:/tmp/php-fpm.sock; - fastcgi_index index.php; + fastcgi_index {HTTP_INDEX_FILE}; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; diff --git a/Dockerfiles/web-nginx-mysql/alpine/conf/etc/zabbix/nginx_ssl.conf b/Dockerfiles/web-nginx-mysql/alpine/conf/etc/zabbix/nginx_ssl.conf index 339878dc4..f94d1a84e 100644 --- a/Dockerfiles/web-nginx-mysql/alpine/conf/etc/zabbix/nginx_ssl.conf +++ b/Dockerfiles/web-nginx-mysql/alpine/conf/etc/zabbix/nginx_ssl.conf @@ -5,7 +5,7 @@ server { server_name zabbix; server_name_in_redirect off; - index index.php; + index {HTTP_INDEX_FILE}; access_log /var/log/nginx/access.log main; error_log /var/log/nginx/error.log error; @@ -78,7 +78,6 @@ server { fastcgi_pass unix:/tmp/php-fpm.sock; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; - fastcgi_index index.php; include fastcgi_params; } @@ -88,7 +87,7 @@ server { location ~ .php$ { fastcgi_pass unix:/tmp/php-fpm.sock; - fastcgi_index index.php; + fastcgi_index {HTTP_INDEX_FILE}; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; diff --git a/Dockerfiles/web-nginx-mysql/alpine/docker-entrypoint.sh b/Dockerfiles/web-nginx-mysql/alpine/docker-entrypoint.sh index 89e0ce679..fb64d1099 100755 --- a/Dockerfiles/web-nginx-mysql/alpine/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-mysql/alpine/docker-entrypoint.sh @@ -229,10 +229,19 @@ prepare_zbx_web_config() { -e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \ "$ZABBIX_ETC_DIR/nginx.conf" + : ${HTTP_INDEX_FILE:="index.php"} + sed -i \ + -e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \ + "$ZABBIX_ETC_DIR/nginx.conf" + if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then sed -i \ -e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \ "$ZABBIX_ETC_DIR/nginx_ssl.conf" + + sed -i \ + -e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \ + "$ZABBIX_ETC_DIR/nginx_ssl.conf" fi : ${ENABLE_WEB_ACCESS_LOG:="true"} diff --git a/Dockerfiles/web-nginx-mysql/centos/conf/etc/zabbix/nginx.conf b/Dockerfiles/web-nginx-mysql/centos/conf/etc/zabbix/nginx.conf index d9d8a743a..8de1ca686 100644 --- a/Dockerfiles/web-nginx-mysql/centos/conf/etc/zabbix/nginx.conf +++ b/Dockerfiles/web-nginx-mysql/centos/conf/etc/zabbix/nginx.conf @@ -3,7 +3,7 @@ server { listen [::]:8080; server_name zabbix; - index index.php; + index {HTTP_INDEX_FILE}; access_log /var/log/nginx/access.log main; error_log /var/log/nginx/error.log notice; @@ -51,7 +51,6 @@ server { fastcgi_pass unix:/tmp/php-fpm.sock; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; - fastcgi_index index.php; include fastcgi_params; } @@ -61,7 +60,7 @@ server { location ~ .php$ { fastcgi_pass unix:/tmp/php-fpm.sock; - fastcgi_index index.php; + fastcgi_index {HTTP_INDEX_FILE}; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; diff --git a/Dockerfiles/web-nginx-mysql/centos/conf/etc/zabbix/nginx_ssl.conf b/Dockerfiles/web-nginx-mysql/centos/conf/etc/zabbix/nginx_ssl.conf index 339878dc4..f94d1a84e 100644 --- a/Dockerfiles/web-nginx-mysql/centos/conf/etc/zabbix/nginx_ssl.conf +++ b/Dockerfiles/web-nginx-mysql/centos/conf/etc/zabbix/nginx_ssl.conf @@ -5,7 +5,7 @@ server { server_name zabbix; server_name_in_redirect off; - index index.php; + index {HTTP_INDEX_FILE}; access_log /var/log/nginx/access.log main; error_log /var/log/nginx/error.log error; @@ -78,7 +78,6 @@ server { fastcgi_pass unix:/tmp/php-fpm.sock; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; - fastcgi_index index.php; include fastcgi_params; } @@ -88,7 +87,7 @@ server { location ~ .php$ { fastcgi_pass unix:/tmp/php-fpm.sock; - fastcgi_index index.php; + fastcgi_index {HTTP_INDEX_FILE}; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; diff --git a/Dockerfiles/web-nginx-mysql/centos/docker-entrypoint.sh b/Dockerfiles/web-nginx-mysql/centos/docker-entrypoint.sh index 1d839bd1a..25b56706b 100755 --- a/Dockerfiles/web-nginx-mysql/centos/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-mysql/centos/docker-entrypoint.sh @@ -229,10 +229,19 @@ prepare_zbx_web_config() { -e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \ "$ZABBIX_ETC_DIR/nginx.conf" + : ${HTTP_INDEX_FILE:="index.php"} + sed -i \ + -e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \ + "$ZABBIX_ETC_DIR/nginx.conf" + if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then sed -i \ -e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \ "$ZABBIX_ETC_DIR/nginx_ssl.conf" + + sed -i \ + -e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \ + "$ZABBIX_ETC_DIR/nginx_ssl.conf" fi : ${ENABLE_WEB_ACCESS_LOG:="true"} diff --git a/Dockerfiles/web-nginx-mysql/ol/conf/etc/zabbix/nginx.conf b/Dockerfiles/web-nginx-mysql/ol/conf/etc/zabbix/nginx.conf index d9d8a743a..8de1ca686 100644 --- a/Dockerfiles/web-nginx-mysql/ol/conf/etc/zabbix/nginx.conf +++ b/Dockerfiles/web-nginx-mysql/ol/conf/etc/zabbix/nginx.conf @@ -3,7 +3,7 @@ server { listen [::]:8080; server_name zabbix; - index index.php; + index {HTTP_INDEX_FILE}; access_log /var/log/nginx/access.log main; error_log /var/log/nginx/error.log notice; @@ -51,7 +51,6 @@ server { fastcgi_pass unix:/tmp/php-fpm.sock; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; - fastcgi_index index.php; include fastcgi_params; } @@ -61,7 +60,7 @@ server { location ~ .php$ { fastcgi_pass unix:/tmp/php-fpm.sock; - fastcgi_index index.php; + fastcgi_index {HTTP_INDEX_FILE}; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; diff --git a/Dockerfiles/web-nginx-mysql/ol/conf/etc/zabbix/nginx_ssl.conf b/Dockerfiles/web-nginx-mysql/ol/conf/etc/zabbix/nginx_ssl.conf index 339878dc4..f94d1a84e 100644 --- a/Dockerfiles/web-nginx-mysql/ol/conf/etc/zabbix/nginx_ssl.conf +++ b/Dockerfiles/web-nginx-mysql/ol/conf/etc/zabbix/nginx_ssl.conf @@ -5,7 +5,7 @@ server { server_name zabbix; server_name_in_redirect off; - index index.php; + index {HTTP_INDEX_FILE}; access_log /var/log/nginx/access.log main; error_log /var/log/nginx/error.log error; @@ -78,7 +78,6 @@ server { fastcgi_pass unix:/tmp/php-fpm.sock; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; - fastcgi_index index.php; include fastcgi_params; } @@ -88,7 +87,7 @@ server { location ~ .php$ { fastcgi_pass unix:/tmp/php-fpm.sock; - fastcgi_index index.php; + fastcgi_index {HTTP_INDEX_FILE}; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; diff --git a/Dockerfiles/web-nginx-mysql/ol/docker-entrypoint.sh b/Dockerfiles/web-nginx-mysql/ol/docker-entrypoint.sh index 1d839bd1a..25b56706b 100755 --- a/Dockerfiles/web-nginx-mysql/ol/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-mysql/ol/docker-entrypoint.sh @@ -229,10 +229,19 @@ prepare_zbx_web_config() { -e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \ "$ZABBIX_ETC_DIR/nginx.conf" + : ${HTTP_INDEX_FILE:="index.php"} + sed -i \ + -e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \ + "$ZABBIX_ETC_DIR/nginx.conf" + if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then sed -i \ -e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \ "$ZABBIX_ETC_DIR/nginx_ssl.conf" + + sed -i \ + -e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \ + "$ZABBIX_ETC_DIR/nginx_ssl.conf" fi : ${ENABLE_WEB_ACCESS_LOG:="true"} diff --git a/Dockerfiles/web-nginx-mysql/rhel/conf/etc/zabbix/nginx.conf b/Dockerfiles/web-nginx-mysql/rhel/conf/etc/zabbix/nginx.conf index d9d8a743a..8de1ca686 100644 --- a/Dockerfiles/web-nginx-mysql/rhel/conf/etc/zabbix/nginx.conf +++ b/Dockerfiles/web-nginx-mysql/rhel/conf/etc/zabbix/nginx.conf @@ -3,7 +3,7 @@ server { listen [::]:8080; server_name zabbix; - index index.php; + index {HTTP_INDEX_FILE}; access_log /var/log/nginx/access.log main; error_log /var/log/nginx/error.log notice; @@ -51,7 +51,6 @@ server { fastcgi_pass unix:/tmp/php-fpm.sock; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; - fastcgi_index index.php; include fastcgi_params; } @@ -61,7 +60,7 @@ server { location ~ .php$ { fastcgi_pass unix:/tmp/php-fpm.sock; - fastcgi_index index.php; + fastcgi_index {HTTP_INDEX_FILE}; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; diff --git a/Dockerfiles/web-nginx-mysql/rhel/conf/etc/zabbix/nginx_ssl.conf b/Dockerfiles/web-nginx-mysql/rhel/conf/etc/zabbix/nginx_ssl.conf index 339878dc4..f94d1a84e 100644 --- a/Dockerfiles/web-nginx-mysql/rhel/conf/etc/zabbix/nginx_ssl.conf +++ b/Dockerfiles/web-nginx-mysql/rhel/conf/etc/zabbix/nginx_ssl.conf @@ -5,7 +5,7 @@ server { server_name zabbix; server_name_in_redirect off; - index index.php; + index {HTTP_INDEX_FILE}; access_log /var/log/nginx/access.log main; error_log /var/log/nginx/error.log error; @@ -78,7 +78,6 @@ server { fastcgi_pass unix:/tmp/php-fpm.sock; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; - fastcgi_index index.php; include fastcgi_params; } @@ -88,7 +87,7 @@ server { location ~ .php$ { fastcgi_pass unix:/tmp/php-fpm.sock; - fastcgi_index index.php; + fastcgi_index {HTTP_INDEX_FILE}; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; diff --git a/Dockerfiles/web-nginx-mysql/rhel/docker-entrypoint.sh b/Dockerfiles/web-nginx-mysql/rhel/docker-entrypoint.sh index 1455fb102..dbc6a23de 100755 --- a/Dockerfiles/web-nginx-mysql/rhel/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-mysql/rhel/docker-entrypoint.sh @@ -229,10 +229,19 @@ prepare_zbx_web_config() { -e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \ "$ZABBIX_ETC_DIR/nginx.conf" + : ${HTTP_INDEX_FILE:="index.php"} + sed -i \ + -e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \ + "$ZABBIX_ETC_DIR/nginx.conf" + if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then sed -i \ -e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \ "$ZABBIX_ETC_DIR/nginx_ssl.conf" + + sed -i \ + -e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \ + "$ZABBIX_ETC_DIR/nginx_ssl.conf" fi : ${ENABLE_WEB_ACCESS_LOG:="true"} diff --git a/Dockerfiles/web-nginx-mysql/ubuntu/conf/etc/zabbix/nginx.conf b/Dockerfiles/web-nginx-mysql/ubuntu/conf/etc/zabbix/nginx.conf index d9d8a743a..8de1ca686 100644 --- a/Dockerfiles/web-nginx-mysql/ubuntu/conf/etc/zabbix/nginx.conf +++ b/Dockerfiles/web-nginx-mysql/ubuntu/conf/etc/zabbix/nginx.conf @@ -3,7 +3,7 @@ server { listen [::]:8080; server_name zabbix; - index index.php; + index {HTTP_INDEX_FILE}; access_log /var/log/nginx/access.log main; error_log /var/log/nginx/error.log notice; @@ -51,7 +51,6 @@ server { fastcgi_pass unix:/tmp/php-fpm.sock; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; - fastcgi_index index.php; include fastcgi_params; } @@ -61,7 +60,7 @@ server { location ~ .php$ { fastcgi_pass unix:/tmp/php-fpm.sock; - fastcgi_index index.php; + fastcgi_index {HTTP_INDEX_FILE}; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; diff --git a/Dockerfiles/web-nginx-mysql/ubuntu/conf/etc/zabbix/nginx_ssl.conf b/Dockerfiles/web-nginx-mysql/ubuntu/conf/etc/zabbix/nginx_ssl.conf index 339878dc4..f94d1a84e 100644 --- a/Dockerfiles/web-nginx-mysql/ubuntu/conf/etc/zabbix/nginx_ssl.conf +++ b/Dockerfiles/web-nginx-mysql/ubuntu/conf/etc/zabbix/nginx_ssl.conf @@ -5,7 +5,7 @@ server { server_name zabbix; server_name_in_redirect off; - index index.php; + index {HTTP_INDEX_FILE}; access_log /var/log/nginx/access.log main; error_log /var/log/nginx/error.log error; @@ -78,7 +78,6 @@ server { fastcgi_pass unix:/tmp/php-fpm.sock; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; - fastcgi_index index.php; include fastcgi_params; } @@ -88,7 +87,7 @@ server { location ~ .php$ { fastcgi_pass unix:/tmp/php-fpm.sock; - fastcgi_index index.php; + fastcgi_index {HTTP_INDEX_FILE}; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; diff --git a/Dockerfiles/web-nginx-mysql/ubuntu/docker-entrypoint.sh b/Dockerfiles/web-nginx-mysql/ubuntu/docker-entrypoint.sh index 4fbecee72..056ba9e81 100755 --- a/Dockerfiles/web-nginx-mysql/ubuntu/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-mysql/ubuntu/docker-entrypoint.sh @@ -229,10 +229,19 @@ prepare_zbx_web_config() { -e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \ "$ZABBIX_ETC_DIR/nginx.conf" + : ${HTTP_INDEX_FILE:="index.php"} + sed -i \ + -e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \ + "$ZABBIX_ETC_DIR/nginx.conf" + if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then sed -i \ -e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \ "$ZABBIX_ETC_DIR/nginx_ssl.conf" + + sed -i \ + -e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \ + "$ZABBIX_ETC_DIR/nginx_ssl.conf" fi : ${ENABLE_WEB_ACCESS_LOG:="true"} diff --git a/Dockerfiles/web-nginx-pgsql/README.md b/Dockerfiles/web-nginx-pgsql/README.md index e0338594c..53ee8236c 100644 --- a/Dockerfiles/web-nginx-pgsql/README.md +++ b/Dockerfiles/web-nginx-pgsql/README.md @@ -140,6 +140,10 @@ Use IEEE754 compatible value range for 64-bit Numeric (float) history values. Av The variable sets the Access Log directive for Web-server. By default, value corresponds to standard output. +### `HTTP_INDEX_FILE` + +The variable controls default index page. By default, `index.php`. + ### `ZBX_MAXEXECUTIONTIME` The varable is PHP ``max_execution_time`` option. By default, value is `300`. diff --git a/Dockerfiles/web-nginx-pgsql/alpine/conf/etc/zabbix/nginx.conf b/Dockerfiles/web-nginx-pgsql/alpine/conf/etc/zabbix/nginx.conf index d9d8a743a..8de1ca686 100644 --- a/Dockerfiles/web-nginx-pgsql/alpine/conf/etc/zabbix/nginx.conf +++ b/Dockerfiles/web-nginx-pgsql/alpine/conf/etc/zabbix/nginx.conf @@ -3,7 +3,7 @@ server { listen [::]:8080; server_name zabbix; - index index.php; + index {HTTP_INDEX_FILE}; access_log /var/log/nginx/access.log main; error_log /var/log/nginx/error.log notice; @@ -51,7 +51,6 @@ server { fastcgi_pass unix:/tmp/php-fpm.sock; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; - fastcgi_index index.php; include fastcgi_params; } @@ -61,7 +60,7 @@ server { location ~ .php$ { fastcgi_pass unix:/tmp/php-fpm.sock; - fastcgi_index index.php; + fastcgi_index {HTTP_INDEX_FILE}; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; diff --git a/Dockerfiles/web-nginx-pgsql/alpine/conf/etc/zabbix/nginx_ssl.conf b/Dockerfiles/web-nginx-pgsql/alpine/conf/etc/zabbix/nginx_ssl.conf index 339878dc4..f94d1a84e 100644 --- a/Dockerfiles/web-nginx-pgsql/alpine/conf/etc/zabbix/nginx_ssl.conf +++ b/Dockerfiles/web-nginx-pgsql/alpine/conf/etc/zabbix/nginx_ssl.conf @@ -5,7 +5,7 @@ server { server_name zabbix; server_name_in_redirect off; - index index.php; + index {HTTP_INDEX_FILE}; access_log /var/log/nginx/access.log main; error_log /var/log/nginx/error.log error; @@ -78,7 +78,6 @@ server { fastcgi_pass unix:/tmp/php-fpm.sock; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; - fastcgi_index index.php; include fastcgi_params; } @@ -88,7 +87,7 @@ server { location ~ .php$ { fastcgi_pass unix:/tmp/php-fpm.sock; - fastcgi_index index.php; + fastcgi_index {HTTP_INDEX_FILE}; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; diff --git a/Dockerfiles/web-nginx-pgsql/alpine/docker-entrypoint.sh b/Dockerfiles/web-nginx-pgsql/alpine/docker-entrypoint.sh index 67ab06871..f281aa2cc 100755 --- a/Dockerfiles/web-nginx-pgsql/alpine/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-pgsql/alpine/docker-entrypoint.sh @@ -216,10 +216,19 @@ prepare_zbx_web_config() { -e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \ "$ZABBIX_ETC_DIR/nginx.conf" + : ${HTTP_INDEX_FILE:="index.php"} + sed -i \ + -e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \ + "$ZABBIX_ETC_DIR/nginx.conf" + if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then sed -i \ -e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \ "$ZABBIX_ETC_DIR/nginx_ssl.conf" + + sed -i \ + -e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \ + "$ZABBIX_ETC_DIR/nginx_ssl.conf" fi : ${ENABLE_WEB_ACCESS_LOG:="true"} diff --git a/Dockerfiles/web-nginx-pgsql/centos/conf/etc/zabbix/nginx.conf b/Dockerfiles/web-nginx-pgsql/centos/conf/etc/zabbix/nginx.conf index d9d8a743a..8de1ca686 100644 --- a/Dockerfiles/web-nginx-pgsql/centos/conf/etc/zabbix/nginx.conf +++ b/Dockerfiles/web-nginx-pgsql/centos/conf/etc/zabbix/nginx.conf @@ -3,7 +3,7 @@ server { listen [::]:8080; server_name zabbix; - index index.php; + index {HTTP_INDEX_FILE}; access_log /var/log/nginx/access.log main; error_log /var/log/nginx/error.log notice; @@ -51,7 +51,6 @@ server { fastcgi_pass unix:/tmp/php-fpm.sock; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; - fastcgi_index index.php; include fastcgi_params; } @@ -61,7 +60,7 @@ server { location ~ .php$ { fastcgi_pass unix:/tmp/php-fpm.sock; - fastcgi_index index.php; + fastcgi_index {HTTP_INDEX_FILE}; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; diff --git a/Dockerfiles/web-nginx-pgsql/centos/conf/etc/zabbix/nginx_ssl.conf b/Dockerfiles/web-nginx-pgsql/centos/conf/etc/zabbix/nginx_ssl.conf index 339878dc4..f94d1a84e 100644 --- a/Dockerfiles/web-nginx-pgsql/centos/conf/etc/zabbix/nginx_ssl.conf +++ b/Dockerfiles/web-nginx-pgsql/centos/conf/etc/zabbix/nginx_ssl.conf @@ -5,7 +5,7 @@ server { server_name zabbix; server_name_in_redirect off; - index index.php; + index {HTTP_INDEX_FILE}; access_log /var/log/nginx/access.log main; error_log /var/log/nginx/error.log error; @@ -78,7 +78,6 @@ server { fastcgi_pass unix:/tmp/php-fpm.sock; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; - fastcgi_index index.php; include fastcgi_params; } @@ -88,7 +87,7 @@ server { location ~ .php$ { fastcgi_pass unix:/tmp/php-fpm.sock; - fastcgi_index index.php; + fastcgi_index {HTTP_INDEX_FILE}; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; diff --git a/Dockerfiles/web-nginx-pgsql/centos/docker-entrypoint.sh b/Dockerfiles/web-nginx-pgsql/centos/docker-entrypoint.sh index c0f8071aa..9aa70b99d 100755 --- a/Dockerfiles/web-nginx-pgsql/centos/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-pgsql/centos/docker-entrypoint.sh @@ -216,10 +216,19 @@ prepare_zbx_web_config() { -e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \ "$ZABBIX_ETC_DIR/nginx.conf" + : ${HTTP_INDEX_FILE:="index.php"} + sed -i \ + -e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \ + "$ZABBIX_ETC_DIR/nginx.conf" + if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then sed -i \ -e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \ "$ZABBIX_ETC_DIR/nginx_ssl.conf" + + sed -i \ + -e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \ + "$ZABBIX_ETC_DIR/nginx_ssl.conf" fi : ${ENABLE_WEB_ACCESS_LOG:="true"} diff --git a/Dockerfiles/web-nginx-pgsql/ol/conf/etc/zabbix/nginx.conf b/Dockerfiles/web-nginx-pgsql/ol/conf/etc/zabbix/nginx.conf index d9d8a743a..8de1ca686 100644 --- a/Dockerfiles/web-nginx-pgsql/ol/conf/etc/zabbix/nginx.conf +++ b/Dockerfiles/web-nginx-pgsql/ol/conf/etc/zabbix/nginx.conf @@ -3,7 +3,7 @@ server { listen [::]:8080; server_name zabbix; - index index.php; + index {HTTP_INDEX_FILE}; access_log /var/log/nginx/access.log main; error_log /var/log/nginx/error.log notice; @@ -51,7 +51,6 @@ server { fastcgi_pass unix:/tmp/php-fpm.sock; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; - fastcgi_index index.php; include fastcgi_params; } @@ -61,7 +60,7 @@ server { location ~ .php$ { fastcgi_pass unix:/tmp/php-fpm.sock; - fastcgi_index index.php; + fastcgi_index {HTTP_INDEX_FILE}; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; diff --git a/Dockerfiles/web-nginx-pgsql/ol/conf/etc/zabbix/nginx_ssl.conf b/Dockerfiles/web-nginx-pgsql/ol/conf/etc/zabbix/nginx_ssl.conf index 339878dc4..f94d1a84e 100644 --- a/Dockerfiles/web-nginx-pgsql/ol/conf/etc/zabbix/nginx_ssl.conf +++ b/Dockerfiles/web-nginx-pgsql/ol/conf/etc/zabbix/nginx_ssl.conf @@ -5,7 +5,7 @@ server { server_name zabbix; server_name_in_redirect off; - index index.php; + index {HTTP_INDEX_FILE}; access_log /var/log/nginx/access.log main; error_log /var/log/nginx/error.log error; @@ -78,7 +78,6 @@ server { fastcgi_pass unix:/tmp/php-fpm.sock; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; - fastcgi_index index.php; include fastcgi_params; } @@ -88,7 +87,7 @@ server { location ~ .php$ { fastcgi_pass unix:/tmp/php-fpm.sock; - fastcgi_index index.php; + fastcgi_index {HTTP_INDEX_FILE}; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; diff --git a/Dockerfiles/web-nginx-pgsql/ol/docker-entrypoint.sh b/Dockerfiles/web-nginx-pgsql/ol/docker-entrypoint.sh index c0f8071aa..9aa70b99d 100755 --- a/Dockerfiles/web-nginx-pgsql/ol/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-pgsql/ol/docker-entrypoint.sh @@ -216,10 +216,19 @@ prepare_zbx_web_config() { -e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \ "$ZABBIX_ETC_DIR/nginx.conf" + : ${HTTP_INDEX_FILE:="index.php"} + sed -i \ + -e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \ + "$ZABBIX_ETC_DIR/nginx.conf" + if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then sed -i \ -e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \ "$ZABBIX_ETC_DIR/nginx_ssl.conf" + + sed -i \ + -e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \ + "$ZABBIX_ETC_DIR/nginx_ssl.conf" fi : ${ENABLE_WEB_ACCESS_LOG:="true"} diff --git a/Dockerfiles/web-nginx-pgsql/ubuntu/conf/etc/zabbix/nginx.conf b/Dockerfiles/web-nginx-pgsql/ubuntu/conf/etc/zabbix/nginx.conf index d9d8a743a..8de1ca686 100644 --- a/Dockerfiles/web-nginx-pgsql/ubuntu/conf/etc/zabbix/nginx.conf +++ b/Dockerfiles/web-nginx-pgsql/ubuntu/conf/etc/zabbix/nginx.conf @@ -3,7 +3,7 @@ server { listen [::]:8080; server_name zabbix; - index index.php; + index {HTTP_INDEX_FILE}; access_log /var/log/nginx/access.log main; error_log /var/log/nginx/error.log notice; @@ -51,7 +51,6 @@ server { fastcgi_pass unix:/tmp/php-fpm.sock; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; - fastcgi_index index.php; include fastcgi_params; } @@ -61,7 +60,7 @@ server { location ~ .php$ { fastcgi_pass unix:/tmp/php-fpm.sock; - fastcgi_index index.php; + fastcgi_index {HTTP_INDEX_FILE}; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; diff --git a/Dockerfiles/web-nginx-pgsql/ubuntu/conf/etc/zabbix/nginx_ssl.conf b/Dockerfiles/web-nginx-pgsql/ubuntu/conf/etc/zabbix/nginx_ssl.conf index 339878dc4..f94d1a84e 100644 --- a/Dockerfiles/web-nginx-pgsql/ubuntu/conf/etc/zabbix/nginx_ssl.conf +++ b/Dockerfiles/web-nginx-pgsql/ubuntu/conf/etc/zabbix/nginx_ssl.conf @@ -5,7 +5,7 @@ server { server_name zabbix; server_name_in_redirect off; - index index.php; + index {HTTP_INDEX_FILE}; access_log /var/log/nginx/access.log main; error_log /var/log/nginx/error.log error; @@ -78,7 +78,6 @@ server { fastcgi_pass unix:/tmp/php-fpm.sock; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; - fastcgi_index index.php; include fastcgi_params; } @@ -88,7 +87,7 @@ server { location ~ .php$ { fastcgi_pass unix:/tmp/php-fpm.sock; - fastcgi_index index.php; + fastcgi_index {HTTP_INDEX_FILE}; fastcgi_param SCRIPT_FILENAME $webroot$fastcgi_script_name; diff --git a/Dockerfiles/web-nginx-pgsql/ubuntu/docker-entrypoint.sh b/Dockerfiles/web-nginx-pgsql/ubuntu/docker-entrypoint.sh index 5db8da297..3618e829b 100755 --- a/Dockerfiles/web-nginx-pgsql/ubuntu/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-pgsql/ubuntu/docker-entrypoint.sh @@ -216,10 +216,19 @@ prepare_zbx_web_config() { -e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \ "$ZABBIX_ETC_DIR/nginx.conf" + : ${HTTP_INDEX_FILE:="index.php"} + sed -i \ + -e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \ + "$ZABBIX_ETC_DIR/nginx.conf" + if [ -f "$ZABBIX_ETC_DIR/nginx_ssl.conf" ]; then sed -i \ -e "s/{FCGI_READ_TIMEOUT}/${FCGI_READ_TIMEOUT}/g" \ "$ZABBIX_ETC_DIR/nginx_ssl.conf" + + sed -i \ + -e "s/{HTTP_INDEX_FILE}/${HTTP_INDEX_FILE}/g" \ + "$ZABBIX_ETC_DIR/nginx_ssl.conf" fi : ${ENABLE_WEB_ACCESS_LOG:="true"} diff --git a/env_vars/.env_web b/env_vars/.env_web index a9d0a59ab..07a61e380 100644 --- a/env_vars/.env_web +++ b/env_vars/.env_web @@ -22,6 +22,7 @@ ZBX_SERVER_NAME=Composed installation # ZBX_DENY_GUI_ACCESS=false # ZBX_GUI_ACCESS_IP_RANGE=['127.0.0.1'] # ZBX_GUI_WARNING_MSG=Zabbix is under maintenance. +# HTTP_INDEX_FILE=index.php # PHP_FPM_PM=dynamic # PHP_FPM_PM_MAX_CHILDREN=50