Nginx FCGIWrap Perl: File Upload not working.

Francis Daly francis at daoine.org
Thu Apr 4 23:03:53 UTC 2019


On Mon, Apr 01, 2019 at 09:34:06AM +0000, Alexander Jaiboy via nginx wrote:

Hi there,

> I am trying to up host my websites using NGINX webserver. The backend is
> Perl CGI scripts (i am using fcgiwrap for the handling the CGI requests).I
> am finding difficulty with file upload.

>  location ~ /bin/diag/upload {

>    # Pass altered request body to this location
>    upload_pass @fastcgi;

The "upload" module is not part of stock nginx -- it is a third party
module. It does some useful things, including making it easier for you
to write your own CGI-like script to handle file uploads.

But it looks like you are using a "standard" file upload CGI script,
which expects things the "normal" way, rather than the way that the
upload module presents things.

I think that you can probably do without the upload module at all.

So if you remove the whole "location ~ /bin/diag/upload {}" block, and
then change your current "location @fastcgi" to instead be "location
= /bin/diag/upload" (so that it handles only this request directly),
then I think that things might Just Work.

Note: only do this as a test. If you use @fastcgi anywhere else in your
config, this change will break that. In that case, if the test succeeds,
you can change things so that everything still works.

Good luck with it,

	f
-- 
Francis Daly        francis at daoine.org


More information about the nginx mailing list