nginx: backport master changes to 19.07

Currently luci is broken in 19.07.
Changes done to fix this problem didn't merge in the
19.07 release.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
This commit is contained in:
Ansuel Smith
2020-01-31 23:06:46 +01:00
parent f7b3d00620
commit 8b5c2901c0
9 changed files with 122 additions and 57 deletions
@@ -25,4 +25,17 @@ if [ -f "/etc/nginx/luci_nginx.conf" ] && [ -f "/etc/nginx/nginx.conf" ]; then
fi
fi
if nginx -V 2>&1 | grep -q ubus; then
if [ -z "$(cat /etc/nginx/luci_uwsgi.conf | grep ubus)" ]; then
cat <<EOT >> /etc/nginx/luci_uwsgi.conf
location /ubus {
ubus_interpreter;
ubus_socket_path /var/run/ubus.sock;
ubus_parallel_req 2;
}
EOT
fi
fi
exit 0