Skip to content

Improve the reverse-proxies documentation #35231

@johny-mnemonic

Description

@johny-mnemonic

Description

While following the documentation for reverse-proxies I have configured my Nginx using the NginxProxyManager and ended with the same 400 bad request error as reported in #31141

For me it also helped to remove the proxy_set_header Host $host; directive and after quite a lot of searching I have found why.

The NginxProxyManager is adding some directives for a custom location by default and looks like Nginx is not happy if you specify the Host header twice.

Could you please update the documentation mentioning to only include following directives when using NginxProxyManager?

client_max_body_size 512M;
proxy_set_header Connection $http_connection;
proxy_set_header Upgrade $http_upgrade;

Or maybe just mention that 400 bad request might be caused by double definition of the proxy_set_header Host $host; coming from custom Nginx server configuration?

Whatever will help others that might stumble into the same trap 🤞

Gitea Version

1.24.4

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

I am running Gitea in docker swarm with the NPM running on Proxmox server.

Database

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/needs-feedbackFor bugs, we need more details. For features, the feature must be described in more detailtype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions