go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
45.3k stars 5.51k forks source link

Gitea subdir / subpath reverse proxy almost worked, but slightly bugged. #32446

Closed AzulEterno closed 2 weeks ago

AzulEterno commented 2 weeks ago

Description

Gitea subpath worked almost perfectly. But still has several bugs. First it's that you have to add a "/" at the end of reverse proxy egine url. That will cause some inconsistency. Second is /login/oauth cannot get correct result since default login url it's not subdirred like "/gitea/login/oauth". I tried to use 301 to redirect all /login/ to /gitea/login, it showed login succeed but never passed back to local program. Any idea how to fix it?

Gitea Version

1.12.2

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

image

Git Version

No response

Operating System

No response

How are you running Gitea?

Offical version inside docker.

Database

PostgreSQL

wxiaoguang commented 2 weeks ago
  1. the trailing slash: please correctly setup your reverse proxy https://docs.gitea.com/next/administration/reverse-proxies#nginx-with-a-sub-path
  2. see this #31974
AzulEterno commented 2 weeks ago
  1. the trailing slash: please correctly setup your reverse proxy https://docs.gitea.com/next/administration/reverse-proxies#nginx-with-a-sub-path
  2. see this Git oauth2 credential client doesn't work on "/{sub-path}/login/oauth/authorize“ #31974
wxiaoguang commented 2 weeks ago

Hmm , just saw "I definitely tried official reverse proxy settings, it does not work. I assure. It will pop js not found error." from email notification.

Not sure how it happens. What's your config?

AzulEterno commented 2 weeks ago

Hmm , just saw "I definitely tried official reverse proxy settings, it does not work. I assure. It will pop js not found error." from email notification.

Not sure how it happens. What's your config?

It was pre-routed by the other nginx configs. Sorry I didn't check it carefully,