Introduced new HTTP_INDEX_FILE variable to control index page

This commit is contained in:
Alexey Pustovalov 2024-01-20 20:40:13 +09:00
parent 3f92c40c49
commit 1474c740b5
56 changed files with 238 additions and 70 deletions

View File

@ -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`.

View File

@ -1,7 +1,7 @@
<VirtualHost *:8080>
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

View File

@ -7,7 +7,7 @@ Listen 8443
<VirtualHost *: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

View File

@ -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

View File

@ -1,7 +1,7 @@
<VirtualHost *:8080>
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

View File

@ -6,7 +6,7 @@ Listen 8443
<VirtualHost *: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

View File

@ -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

View File

@ -1,7 +1,7 @@
<VirtualHost *:8080>
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

View File

@ -6,7 +6,7 @@ Listen 8443
<VirtualHost *: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

View File

@ -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

View File

@ -1,7 +1,7 @@
<VirtualHost *:8080>
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

View File

@ -6,7 +6,7 @@ LoadModule headers_module /usr/lib/apache2/modules/mod_headers.so
<VirtualHost *: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

View File

@ -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

View File

@ -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`.

View File

@ -1,7 +1,7 @@
<VirtualHost *:8080>
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

View File

@ -7,7 +7,7 @@ Listen 8443
<VirtualHost *: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

View File

@ -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

View File

@ -1,7 +1,7 @@
<VirtualHost *:8080>
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

View File

@ -6,7 +6,7 @@ Listen 8443
<VirtualHost *: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

View File

@ -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

View File

@ -1,7 +1,7 @@
<VirtualHost *:8080>
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

View File

@ -6,7 +6,7 @@ Listen 8443
<VirtualHost *: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

View File

@ -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

View File

@ -1,7 +1,7 @@
<VirtualHost *:8080>
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

View File

@ -6,7 +6,7 @@ LoadModule headers_module /usr/lib/apache2/modules/mod_headers.so
<VirtualHost *: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

View File

@ -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

View File

@ -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`.

View File

@ -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;

View File

@ -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;

View File

@ -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"}

View File

@ -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;

View File

@ -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;

View File

@ -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"}

View File

@ -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;

View File

@ -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;

View File

@ -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"}

View File

@ -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;

View File

@ -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;

View File

@ -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"}

View File

@ -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;

View File

@ -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;

View File

@ -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"}

View File

@ -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`.

View File

@ -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;

View File

@ -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;

View File

@ -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"}

View File

@ -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;

View File

@ -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;

View File

@ -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"}

View File

@ -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;

View File

@ -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;

View File

@ -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"}

View File

@ -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;

View File

@ -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;

View File

@ -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"}

View File

@ -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