Skip to content

Bug: External NGINX Reverse Proxy (1.26.3) returns 405 Not Allowed on POST requests to nested containers #214

@avagu-mie

Description

@avagu-mie

Description
We are encountering a 405 Not Allowed error when attempting to make POST requests through our external NGINX reverse proxy (nginx/1.26.3) to an API endpoint hosted inside a nested container architecture.

Architecture Example
The traffic flows through an external proxy before hitting the containerized environments. For example, using a host container named pmm-test:
Internet -> os.mieweb.org (NGINX 1.26.3) -> pmm-test (Outer Container) -> Inner Container (API Service)

The Issue
When sending a POST request to an API endpoint on the inner container, the outermost NGINX proxy intercepts the request and rejects it with a 405 Not Allowed status code, rather than using proxy_pass to route it upstream to pmm-test.

Steps to Reproduce
Send a POST request to the proxy endpoint with a standard payload targeting the nested service:

curl -v -X POST -H "Authorization: Basic <redacted>" \
-H "Content-Type: application/x-protobuf" \
https://pmm-test.os.mieweb.org/victoriametrics/api/v1/write

Actual Output (Snippet):
The response headers and body explicitly show the external proxy terminating the request:

< HTTP/2 405 
< server: nginx/1.26.3
< content-type: text/html
...
<html>
<head><title>405 Not Allowed</title></head>
<body>
<center><h1>405 Not Allowed</h1></center>
<hr><center>nginx/1.26.3</center>
</body>
</html>

Expected Behavior
The external NGINX proxy (os.mieweb.org) should successfully route the POST request to the upstream pmm-test service without restricting the HTTP method or attempting to serve the endpoint as a static file.

Additional Context

The error page identifies nginx/1.26.3, confirming the block is happening at the external proxy layer, not within the internal pmm-test application containers.

In NGINX, a 405 Not Allowed often occurs when a location block is misconfigured to serve static files for an API route, or if there is a missing proxy_pass directive for the specific path handling POST methods.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions