Run script before cgi

psychesnet nginx-forum at forum.nginx.org
Thu Sep 2 08:53:30 UTC 2021


Hi all,

We are working on OpenWrt 17.07.8 project with our own developing device.
Since device only have 128MB RAM, it is not enough to do sysupgrade from
WebUI.

So, we would like to stop some services before upload firmware.bin.
The url is /cgi-bin/cgi-upload and it has following rules definitions(we use
nginx+uwsgi).

location ~ /cgi-bin/cgi-(backup|download|upload|exec) {
    include uwsgi_params;
    uwsgi_param SERVER_ADDR $server_addr;
    uwsgi_modifier1 9;
    uwsgi_pass unix:////var/run/luci-cgi_io.socket;
}

We would like to know if it is possible to
1. stop services before pass upload data to be luci-cgi_io.socket?
2. filiter url(cgi-upload) and stop services?

Please share anything if you know something. Thanks.

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,292338,292338#msg-292338



More information about the nginx mailing list