Skip to content

[1.17.0-RC2] Incorrect ROOT_URL warning when using proxy through apache #20501

Closed
@gd197

Description

@gd197

Description

Hello,
my configuration :
app.ini
ROOT_URL = https://host.my.company.corp/gitea
httpd gitea.conf

ProxyPass /gitea http://localhost:8888 nocanon
ProxyPassReverse /gitea http://localhost:8888
ProxyRequests Off
AllowEncodedSlashes NoDecode
ProxyPreserveHost On

output logs on starting gitea :
2022/07/27 10:34:14 cmd/web.go:221:listen() [I] [62e0f886-27] AppURL(ROOT_URL): https://host.my.company.corp/gitea/

please note the trailing slash at the end of the ROOT_URL in the log
ROOT_URL warning occurs when trying to access to https://host.my.company.corp/gitea
ROOT_URL warning does not occurs when trying to access to https://host.my.company.corp/gitea/
Did not find a way to force apache to rewrite url before proxying to application listener

Gitea Version

1.17.0-rc2

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

RHEL 7.9

How are you running Gitea?

Using gitea build from github release tab

Database

MySQL

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/not-a-bugThe reported issue is the intended behavior or the problem is not inside Gitea

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions