On Fri, Apr 16, 2021 at 03:43:51PM +0200, Claudio Jeker wrote: > I tried to use slowcgi to execute a binary in cgi-bin/ when accessing a > resource. > > So the config looked a bit like this: > > location "/foo/bar" { > fastcgi param SCRIPT_FILENAME "/cgi-bin/foobar" > root "" > } > > With this slowcgi fails with: > slowcgi[98607]: execve cgi-bin/foobar: No such file or directory > > Now looking at the code I'm wondering how this is supposed to work. > So because of the present '/' there will be a chdir to the directory where > the binary is but then slowcgi uses the full path to exec that binary > which is not going to work. > > I attached my fix below which for me at least seems to be the intention of > the code. I bet I missed a lot of nitty gritty details though.
Disregard this. My broken config had an non absolute SCRIPT_FILENAME (cgi-bin/foobar) and that is not allowed according to httpd.conf. I fixed the config later on but did not realize that this was the real fix. -- :wq Claudio