Fixed IPv6 listen for Nginx based images

This commit is contained in:
Alexey Pustovalov 2022-07-20 21:53:46 +03:00
parent 27ae669014
commit 12e20b7110
9 changed files with 45 additions and 0 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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