Nginx seems to proxy only http GET

Hi,

I’m using nginx to offload https to http. That works well but in my
backend only GET Requests seem to get through. For all POST, PUT and
DELETE I only receive a Status 400 with conten “HTTP method POST is not
supported by this URL”.

Has anybody experienced this before?

Thanks

Matthias

On 27 January 2014 17:24, Matthias Richter
[email protected] wrote:

Hi,

I’m using nginx to offload https to http. That works well but in my
backend only GET Requests seem to get through. For all POST, PUT and
DELETE I only receive a Status 400 with conten “HTTP method POST is not
supported by this URL”.

That’s your backend telling you that, not nginx.

J

that is strange because I cannot see any requests in the backend log
file. curl requests from command line pop up there though.

so curl -X(DELETE|PUT|POST) localhost:8080/api does show requests in the
logs,
nginx passing them through does not?

Thanks,

Matthias


Von: [email protected] [[email protected]]" im Auftrag
von "Jonathan M. [[email protected]]
Gesendet: Montag, 27. Januar 2014 18:36
Bis: [email protected]
Betreff: Re: nginx seems to proxy only http GET

On 27 January 2014 17:24, Matthias Richter
[email protected] wrote:

Hi,

I’m using nginx to offload https to http. That works well but in my
backend only GET Requests seem to get through. For all POST, PUT and
DELETE I only receive a Status 400 with conten “HTTP method POST is not
supported by this URL”.

That’s your backend telling you that, not nginx.

J


nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

I was able to sort it out. My config was missing proxy_http_version 1.1;
.

Hello!

On Tue, Jan 28, 2014 at 09:08:30AM +0000, Matthias Richter wrote:

I was able to sort it out. My config was missing proxy_http_version 1.1; .

The HTTP/1.1 isn’t required for nginx to proxy POST and other
methods. On the other hand, it’s likely that your backend
requires HTTP/1.1 to handle non-GET requests for some reason, and
with “proxy_http_version 1.1” your backend is now happy.


Maxim D.
http://nginx.org/

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs