File manager - Edit - /usr/local/sbin/update-nginxip
Back
#!/bin/bash set -eu declare -r PUBLIC_IFACE="eth0" # force public if config /usr/sbin/phoenix-ga netinit --configure-iface "$PUBLIC_IFACE" || sleep 10 while ip -6 addr show tentative | grep -q . ; do # wait for ipv6 online sleep 1 done echo "# AUTO-GENERATED FILE. DO NOT MODIFY" > "/etc/nginx/listen.conf" ip -4 addr show "$PUBLIC_IFACE" \ | awk '($1 == "inet"){print $2}' \ | awk -F '/' '{print "listen", $1":80;"}' \ >> "/etc/nginx/listen.conf" ip -6 addr show "$PUBLIC_IFACE" \ | awk '($1 == "inet6" && $NF == "global"){print $2}' \ | awk -F '/' '{print "listen ["$1"]:80;"}' \ >> "/etc/nginx/listen.conf" exec nginx -t -q
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.27 |
proxy
|
phpinfo
|
Settings