-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[1.17.0-RC2] Incorrect ROOT_URL warning when using proxy through apache #20501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Please read the instructions at https://docs.gitea.io/en-us/reverse-proxies/#apache-httpd Your problem is occurring because of the |
I'd like to keep it open and propose a more flexible fix for the URL detection. |
The fix: Some users visit "https://domain/gitea" while appUrl is "https://domain/gitea/", there should be no warning |
removing ProxyPassReverse directive and ProxyPreserveHost but the issue remains the same. |
The PR #20502 will fix the false positive warning. At the moment, you could bypass it by rewrite (using |
thank you very much for your super fast reply, turning around mod_rewrite since yesterday but still not able to make it works, my guess is that apache is proxying first |
You need something like this to bypass:
|
this is what I'm trying but no luck :( |
Now the fix has been released to latest 1.17. You can get it from https://dl.gitea.io/gitea/1.17 or docker gitea:1.17-dev ps: I have tested the Apache config, it should work (the rewirte need R=302 to do the redirection)
|
Uh oh!
There was an error while loading. Please reload this page.
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
The text was updated successfully, but these errors were encountered: