Skip to content

Add HAProxy Config to reverse-proxies.en-us.md #17407

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

Merged
merged 4 commits into from Oct 24, 2021
Merged

Add HAProxy Config to reverse-proxies.en-us.md #17407

merged 4 commits into from Oct 24, 2021

Conversation

ghost
Copy link

@ghost ghost commented Oct 22, 2021

Addition of HAProxy, probably need some rewriting

Addition of HAProxy
@6543 6543 added the type/docs This PR mainly updates/creates documentation label Oct 22, 2021
@6543 6543 changed the title Update reverse-proxies.en-us.md Add HAProxy Config to reverse-proxies.en-us.md Oct 22, 2021
@6543 6543 added this to the 1.16.0 milestone Oct 22, 2021
@6543
Copy link
Member

6543 commented Oct 22, 2021

Looks a bit overly complicated?

Not sure what the url rewrite magic is intended to do/fix/workaround

Also there might be an inconsistency: root path /git vs. /gitea,
why is needed at all if serving from subdomain?

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 22, 2021
@ghost
Copy link
Author

ghost commented Oct 22, 2021

Because it is, or at least I did not find a simpler way yet after spending my whole day trying to make it work with HAProxy.

For the url rewrite it's because Gitea wait for GET / to serve the main page, and without it it will receive GET /gitea/ instead.

The previous command work in the same way, if you ask example.com/gitea without the trailing slash you will get an empty GET, so this time HAProxy will throw you an error.

Now that I have written all that there me be a way to merge both with a better regex...
http-request replace-path /gitea\/?(.*) \/\1
seem to do the job well.

For the ROOT_PATH I misstyped it sorry, but this part is a for subdirectory, not a subdomain, so it is necessary

Edit: I see the overcomplication part, I removed the subdomain for the second example

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Oct 22, 2021
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Oct 23, 2021
@codecov-commenter
Copy link

Codecov Report

Merging #17407 (42a458c) into main (db89504) will increase coverage by 0.09%.
The diff coverage is 60.18%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #17407      +/-   ##
==========================================
+ Coverage   45.16%   45.26%   +0.09%     
==========================================
  Files         784      788       +4     
  Lines       88229    88440     +211     
==========================================
+ Hits        39849    40028     +179     
- Misses      41908    41933      +25     
- Partials     6472     6479       +7     
Impacted Files Coverage Δ
cmd/serv.go 2.46% <0.00%> (ø)
models/db/engine.go 31.25% <0.00%> (ø)
modules/cron/tasks_extended.go 70.16% <0.00%> (ø)
modules/csv/csv.go 73.21% <0.00%> (-2.72%) ⬇️
modules/updatechecker/update_checker.go 0.00% <0.00%> (ø)
routers/common/middleware.go 64.70% <0.00%> (ø)
routers/install/routes.go 45.76% <0.00%> (ø)
routers/web/admin/admin.go 11.34% <0.00%> (ø)
routers/web/base.go 18.00% <0.00%> (ø)
routers/web/repo/issue_content_history.go 0.00% <0.00%> (ø)
... and 42 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 07c7100...42a458c. Read the comment docs.

@6543 6543 merged commit 932780c into go-gitea:main Oct 24, 2021
Chianina pushed a commit to Chianina/gitea that referenced this pull request Mar 28, 2022
* Update reverse-proxies.en-us.md

Addition of HAProxy

* Update reverse-proxies.en-us.md
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/docs This PR mainly updates/creates documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants