Francis Daly
October 04, 2016 03:48PM
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@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Clientbodyinfileonly - POST request is discarded

yurai October 04, 2016 03:28PM

Re: Clientbodyinfileonly - POST request is discarded

Francis Daly October 04, 2016 03:48PM

Re: Clientbodyinfileonly - POST request is discarded

yurai October 07, 2016 03:47PM

Re: Clientbodyinfileonly - POST request is discarded

Francis Daly October 09, 2016 12:06PM

Re: Clientbodyinfileonly - POST request is discarded

yurai October 10, 2016 03:41AM

Re: Clientbodyinfileonly - POST request is discarded

Francis Daly October 10, 2016 12:18PM

Re: Clientbodyinfileonly - POST request is discarded

yurai October 12, 2016 06:28AM

Re: Clientbodyinfileonly - POST request is discarded

Francis Daly October 12, 2016 12:04PM

Re: Clientbodyinfileonly - POST request is discarded

yurai October 12, 2016 03:34PM

Re: Clientbodyinfileonly - POST request is discarded

Francis Daly October 12, 2016 05:46PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 312
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready