Skip to content

Update documentation for reverse proxying static resources #17670

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 3 commits into from
Nov 17, 2021
Merged

Update documentation for reverse proxying static resources #17670

merged 3 commits into from
Nov 17, 2021

Conversation

rstular
Copy link
Contributor

@rstular rstular commented Nov 16, 2021

This pull request fixes an error in the documentation for setting up nginx reverse proxy with gitea.

Currently, documentation sets the location matching pattern to /_/static (contents of the STATIC_URL_PREFIX gitea configuration variable). While this pattern matches the static resource path, it leaves the trailing /assets at the end. As the instruction only instructs the user to target the gitea frontend in the public/ directory as the alias target, this results in nginx looking for files in public/assets/ directory, which doesn't exist.

The fix is to change the matching pattern in nginx configuration to consume the assets/ part of the URL path, which results in nginx properly looking for static resources in the public/ directory.

Gitea fetches static resources from /assets, so nginx configuration has to be updated accordingly.
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Nov 16, 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 Nov 16, 2021
@techknowlogick techknowlogick merged commit 8fdc524 into go-gitea:main Nov 17, 2021
@techknowlogick techknowlogick added type/docs This PR mainly updates/creates documentation skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels Nov 17, 2021
Chianina pushed a commit to Chianina/gitea that referenced this pull request Mar 28, 2022
Gitea fetches static resources from /assets, so nginx configuration has to be updated accordingly.

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
@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. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/docs This PR mainly updates/creates documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants