Sample Header Ad - 728x90

Migrating from Debian 11 to 12, the sudo apt dist-upgrade finishes on a message: 'unknown directive "set_by_lua"' from nginx

1 vote
1 answer
231 views
I am upgrading a VM at work, from Debian 11 to 12. I succeed up to the sudo apt-get dist-upgrade, where it fails on:
Setting up nginx (1.22.1-9) ...
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xeu nginx.service" for details.
invoke-rc.d: initscript nginx, action "start" failed.
× nginx.service - A high performance web server and a reverse proxy server
     Loaded: loaded (/lib/systemd/system/nginx.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Tue 2024-06-11 11:50:59 CEST; 9ms ago
       Docs: man:nginx(8)
    Process: 31990 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
        CPU: 3ms

Jun 11 11:50:59 development systemd: Starting nginx.service - A high performance web server and a reverse proxy server...
Jun 11 11:50:59 development nginx: 2024/06/11 11:50:59 [emerg] 31990#31990: unknown directive "set_by_lua" in /etc/nginx/sites-enabled/default:17
Jun 11 11:50:59 development nginx: nginx: configuration file /etc/nginx/nginx.conf test failed
What's that 'unknown directive "set_by_lua"', and why does it cause a trouble here and now?
Asked by Marc Le Bihan (2353 rep)
Jun 11, 2024, 10:00 AM
Last activity: Jun 11, 2024, 10:57 AM