diff --git a/Dockerfiles/web-nginx-mysql/alpine/docker-entrypoint.sh b/Dockerfiles/web-nginx-mysql/alpine/docker-entrypoint.sh index b52b971bc..774736d25 100755 --- a/Dockerfiles/web-nginx-mysql/alpine/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-mysql/alpine/docker-entrypoint.sh @@ -121,6 +121,11 @@ prepare_web_server() { NGINX_CONFD_DIR="/etc/nginx/http.d" NGINX_SSL_CONFIG="/etc/ssl/nginx" + if [ ! -f "/proc/net/if_inet6" ]; then + sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx.conf" + sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx_ssl.conf" + fi + echo "** Adding Zabbix virtual host (HTTP)" if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf" diff --git a/Dockerfiles/web-nginx-mysql/centos/docker-entrypoint.sh b/Dockerfiles/web-nginx-mysql/centos/docker-entrypoint.sh index 5d0c7e1db..0b1b6420a 100755 --- a/Dockerfiles/web-nginx-mysql/centos/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-mysql/centos/docker-entrypoint.sh @@ -121,6 +121,11 @@ prepare_web_server() { NGINX_CONFD_DIR="/etc/nginx/conf.d" NGINX_SSL_CONFIG="/etc/ssl/nginx" + if [ ! -f "/proc/net/if_inet6" ]; then + sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx.conf" + sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx_ssl.conf" + fi + echo "** Adding Zabbix virtual host (HTTP)" if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf" diff --git a/Dockerfiles/web-nginx-mysql/ol/docker-entrypoint.sh b/Dockerfiles/web-nginx-mysql/ol/docker-entrypoint.sh index 5d0c7e1db..0b1b6420a 100755 --- a/Dockerfiles/web-nginx-mysql/ol/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-mysql/ol/docker-entrypoint.sh @@ -121,6 +121,11 @@ prepare_web_server() { NGINX_CONFD_DIR="/etc/nginx/conf.d" NGINX_SSL_CONFIG="/etc/ssl/nginx" + if [ ! -f "/proc/net/if_inet6" ]; then + sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx.conf" + sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx_ssl.conf" + fi + echo "** Adding Zabbix virtual host (HTTP)" if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf" diff --git a/Dockerfiles/web-nginx-mysql/rhel/docker-entrypoint.sh b/Dockerfiles/web-nginx-mysql/rhel/docker-entrypoint.sh index cb7303711..4e379215f 100755 --- a/Dockerfiles/web-nginx-mysql/rhel/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-mysql/rhel/docker-entrypoint.sh @@ -121,6 +121,11 @@ prepare_web_server() { NGINX_CONFD_DIR="/etc/nginx/conf.d" NGINX_SSL_CONFIG="/etc/ssl/nginx" + if [ ! -f "/proc/net/if_inet6" ]; then + sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx.conf" + sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx_ssl.conf" + fi + echo "** Adding Zabbix virtual host (HTTP)" if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then ln -s "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR" diff --git a/Dockerfiles/web-nginx-mysql/ubuntu/docker-entrypoint.sh b/Dockerfiles/web-nginx-mysql/ubuntu/docker-entrypoint.sh index 1fb592426..32bd1a225 100755 --- a/Dockerfiles/web-nginx-mysql/ubuntu/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-mysql/ubuntu/docker-entrypoint.sh @@ -121,6 +121,11 @@ prepare_web_server() { NGINX_CONFD_DIR="/etc/nginx/conf.d" NGINX_SSL_CONFIG="/etc/ssl/nginx" + if [ ! -f "/proc/net/if_inet6" ]; then + sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx.conf" + sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx_ssl.conf" + fi + echo "** Adding Zabbix virtual host (HTTP)" if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf" diff --git a/Dockerfiles/web-nginx-pgsql/alpine/docker-entrypoint.sh b/Dockerfiles/web-nginx-pgsql/alpine/docker-entrypoint.sh index 7360f7b65..b7861f03d 100755 --- a/Dockerfiles/web-nginx-pgsql/alpine/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-pgsql/alpine/docker-entrypoint.sh @@ -121,6 +121,11 @@ prepare_web_server() { NGINX_CONFD_DIR="/etc/nginx/http.d" NGINX_SSL_CONFIG="/etc/ssl/nginx" + if [ ! -f "/proc/net/if_inet6" ]; then + sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx.conf" + sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx_ssl.conf" + fi + echo "** Adding Zabbix virtual host (HTTP)" if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf" diff --git a/Dockerfiles/web-nginx-pgsql/centos/docker-entrypoint.sh b/Dockerfiles/web-nginx-pgsql/centos/docker-entrypoint.sh index 9185bcaff..f9b620a95 100755 --- a/Dockerfiles/web-nginx-pgsql/centos/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-pgsql/centos/docker-entrypoint.sh @@ -121,6 +121,11 @@ prepare_web_server() { NGINX_CONFD_DIR="/etc/nginx/conf.d" NGINX_SSL_CONFIG="/etc/ssl/nginx" + if [ ! -f "/proc/net/if_inet6" ]; then + sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx.conf" + sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx_ssl.conf" + fi + echo "** Adding Zabbix virtual host (HTTP)" if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf" diff --git a/Dockerfiles/web-nginx-pgsql/ol/docker-entrypoint.sh b/Dockerfiles/web-nginx-pgsql/ol/docker-entrypoint.sh index 9185bcaff..f9b620a95 100755 --- a/Dockerfiles/web-nginx-pgsql/ol/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-pgsql/ol/docker-entrypoint.sh @@ -121,6 +121,11 @@ prepare_web_server() { NGINX_CONFD_DIR="/etc/nginx/conf.d" NGINX_SSL_CONFIG="/etc/ssl/nginx" + if [ ! -f "/proc/net/if_inet6" ]; then + sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx.conf" + sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx_ssl.conf" + fi + echo "** Adding Zabbix virtual host (HTTP)" if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf" diff --git a/Dockerfiles/web-nginx-pgsql/ubuntu/docker-entrypoint.sh b/Dockerfiles/web-nginx-pgsql/ubuntu/docker-entrypoint.sh index 8304fe236..593cb3158 100755 --- a/Dockerfiles/web-nginx-pgsql/ubuntu/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-pgsql/ubuntu/docker-entrypoint.sh @@ -121,6 +121,11 @@ prepare_web_server() { NGINX_CONFD_DIR="/etc/nginx/conf.d" NGINX_SSL_CONFIG="/etc/ssl/nginx" + if [ ! -f "/proc/net/if_inet6" ]; then + sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx.conf" + sed -i '/listen \[::\]/d' "$ZABBIX_ETC_DIR/nginx_ssl.conf" + fi + echo "** Adding Zabbix virtual host (HTTP)" if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"