mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2025-01-10 23:59:06 +01:00
Fixed IPv6 listen for Nginx based images
This commit is contained in:
parent
27ae669014
commit
12e20b7110
@ -121,6 +121,11 @@ prepare_web_server() {
|
|||||||
NGINX_CONFD_DIR="/etc/nginx/http.d"
|
NGINX_CONFD_DIR="/etc/nginx/http.d"
|
||||||
NGINX_SSL_CONFIG="/etc/ssl/nginx"
|
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)"
|
echo "** Adding Zabbix virtual host (HTTP)"
|
||||||
if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then
|
if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then
|
||||||
ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
||||||
|
@ -121,6 +121,11 @@ prepare_web_server() {
|
|||||||
NGINX_CONFD_DIR="/etc/nginx/conf.d"
|
NGINX_CONFD_DIR="/etc/nginx/conf.d"
|
||||||
NGINX_SSL_CONFIG="/etc/ssl/nginx"
|
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)"
|
echo "** Adding Zabbix virtual host (HTTP)"
|
||||||
if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then
|
if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then
|
||||||
ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
||||||
|
@ -121,6 +121,11 @@ prepare_web_server() {
|
|||||||
NGINX_CONFD_DIR="/etc/nginx/conf.d"
|
NGINX_CONFD_DIR="/etc/nginx/conf.d"
|
||||||
NGINX_SSL_CONFIG="/etc/ssl/nginx"
|
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)"
|
echo "** Adding Zabbix virtual host (HTTP)"
|
||||||
if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then
|
if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then
|
||||||
ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
||||||
|
@ -121,6 +121,11 @@ prepare_web_server() {
|
|||||||
NGINX_CONFD_DIR="/etc/nginx/conf.d"
|
NGINX_CONFD_DIR="/etc/nginx/conf.d"
|
||||||
NGINX_SSL_CONFIG="/etc/ssl/nginx"
|
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)"
|
echo "** Adding Zabbix virtual host (HTTP)"
|
||||||
if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then
|
if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then
|
||||||
ln -s "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR"
|
ln -s "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR"
|
||||||
|
@ -121,6 +121,11 @@ prepare_web_server() {
|
|||||||
NGINX_CONFD_DIR="/etc/nginx/conf.d"
|
NGINX_CONFD_DIR="/etc/nginx/conf.d"
|
||||||
NGINX_SSL_CONFIG="/etc/ssl/nginx"
|
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)"
|
echo "** Adding Zabbix virtual host (HTTP)"
|
||||||
if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then
|
if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then
|
||||||
ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
||||||
|
@ -121,6 +121,11 @@ prepare_web_server() {
|
|||||||
NGINX_CONFD_DIR="/etc/nginx/http.d"
|
NGINX_CONFD_DIR="/etc/nginx/http.d"
|
||||||
NGINX_SSL_CONFIG="/etc/ssl/nginx"
|
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)"
|
echo "** Adding Zabbix virtual host (HTTP)"
|
||||||
if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then
|
if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then
|
||||||
ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
||||||
|
@ -121,6 +121,11 @@ prepare_web_server() {
|
|||||||
NGINX_CONFD_DIR="/etc/nginx/conf.d"
|
NGINX_CONFD_DIR="/etc/nginx/conf.d"
|
||||||
NGINX_SSL_CONFIG="/etc/ssl/nginx"
|
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)"
|
echo "** Adding Zabbix virtual host (HTTP)"
|
||||||
if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then
|
if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then
|
||||||
ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
||||||
|
@ -121,6 +121,11 @@ prepare_web_server() {
|
|||||||
NGINX_CONFD_DIR="/etc/nginx/conf.d"
|
NGINX_CONFD_DIR="/etc/nginx/conf.d"
|
||||||
NGINX_SSL_CONFIG="/etc/ssl/nginx"
|
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)"
|
echo "** Adding Zabbix virtual host (HTTP)"
|
||||||
if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then
|
if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then
|
||||||
ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
||||||
|
@ -121,6 +121,11 @@ prepare_web_server() {
|
|||||||
NGINX_CONFD_DIR="/etc/nginx/conf.d"
|
NGINX_CONFD_DIR="/etc/nginx/conf.d"
|
||||||
NGINX_SSL_CONFIG="/etc/ssl/nginx"
|
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)"
|
echo "** Adding Zabbix virtual host (HTTP)"
|
||||||
if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then
|
if [ -f "$ZABBIX_ETC_DIR/nginx.conf" ]; then
|
||||||
ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
ln -sfT "$ZABBIX_ETC_DIR/nginx.conf" "$NGINX_CONFD_DIR/nginx.conf"
|
||||||
|
Loading…
Reference in New Issue
Block a user