Clientbodyinfileonly - POST request is discarded

Francis Daly francis at daoine.org
Tue Oct 4 19:46:42 UTC 2016


On Tue, Oct 04, 2016 at 03:28:18PM -0400, yurai wrote:

Hi there,

> Unfortunately I get "HTTP/1.1 405 Not Allowed" error code all the time.

The "back-end" thing that you POST to must be able to handle the POST.

Right now, you just ask nginx to serve a file from the filesystem,
which does not accept a POST (by default).

>         location / {
>             root   /usr/share/nginx/html/foo/bar;
>             autoindex on;
>         }

Add something like

            return 200 "Do something sensible with $http_x_file\n";

in there and you'll see that it does work.

And then decide what you actually want to do with the file, and make
something do that.

Good luck with it,

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list