Skip to content

Repository redirect not use modified ROOT_URL #8588

Closed
@tomac4t

Description

@tomac4t

Description

I install Gitea under a sub-path /git/ with Nginx as a reverse proxy.

When I modified "repository name", the old repo link should be redirected to the new link. I am expected it redirect to /git/<OwnerNAME>/<RepoName>/, but it actually redirect to /<OwnerNAME>/<RepoName>/.

app.ini:

[server]
PROTOCOL         = http
SSH_DOMAIN       = localhost
DOMAIN           = localhost
HTTP_ADDR        = 127.0.0.1
HTTP_PORT        = 8000
ROOT_URL         = https://example.com/git/
DISABLE_SSH      = true
LFS_START_SERVER = true
LFS_CONTENT_PATH = /var/lib/gitea/data/lfs
[...]

nginx.conf:

location ^~/git/ {
    proxy_pass http://localhost:8000/;
}
[...]

Screenshots

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions