From be822b746a190616fe5b608c39512a57ad7dc3e5 Mon Sep 17 00:00:00 2001 From: bcahlit Date: Mon, 2 Mar 2020 12:02:50 +0800 Subject: [PATCH] add ipv6 listen in nginx --- sh_onmp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh_onmp.sh b/sh_onmp.sh index 1c2c30ad..eaa5a498 100644 --- a/sh_onmp.sh +++ b/sh_onmp.sh @@ -1849,7 +1849,7 @@ server { } EOF -sed -e "s/.*listen.*/ listen $1\;/g" -i /opt/etc/nginx/vhost/$2.conf +sed -e "s/.*listen.*/ listen $1\;\n listen [::]:$1\;/g" -i /opt/etc/nginx/vhost/$2.conf sed -e "s/.*\/opt\/wwwroot\/www\/.*/ root \/opt\/wwwroot\/$2\/\;/g" -i /opt/etc/nginx/vhost/$2.conf }