-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
ROOT_URL not set after many install problems, errors, 404s #19972
Comments
You are using wrong Gitea static (asset) files. The warning is only added in Gitea 1.17 which hasn't been released. But you said you are running |
And I have checked the https://gitlab.com/packaging/gitea/-/blob/master/.gitlab-ci.yml They are using Gitea binary from https://dl.gitea.io/gitea/, which includes static assets. Do not compile the static assets if you do not know how it works. |
Thank you. Nothing I could do allowed the server to display images or css until I built them myself and setup static hosting w/ nginx. It was my mistake in selecting the wrong repo. There are no static assets in the debian package:
|
After I built the static assets from the correct repo, the error on top and the 404s on the dashboard did indeed go away. |
Actually, you do not need to compile that manually. All static assets are embedded inside Gitea binary already. They are served under |
I see. However I'm not able to retrieve the builtin ones via web browser (via ssl, in a subdirectory). My console reports:
I've tried all variations of ROOT_URL, STATIC_URL_PREFIX, and PROTOCOL that I could think of, or saw on other issues. Nor could I get the logging to report individual file access and tell me what the issue was. The only way I was able to get the assets to the browser was by building them myself, and including an additional nginx location block to pull them directly, as I showed in my config:
I have it working now, and thanks to your help, no more error messages. |
If you follow the doc strictly (including the trailing slash or not), there shouldn't be any problem. https://docs.gitea.io/en-us/reverse-proxies/#nginx-with-a-sub-path |
Description
The goal: Set up gitea in a subdirectory on my VPS under https, eg
https://example.com/git/
. No docker.I had a ton of issues setting up a reverse proxy under SSL and a subdirectory. I read through countless issues, but couldn't find a complete working example that worked for me. Also the reverse proxy guide did not work for me. I either got broken images and 404 errors. I think I have it mostly working now, but I have one persistent error on screen, and what is probably a small bug appearing in my logs.
Current issues
I've made an admin, a user, an organization, and an empty repo. I can browse around the system. It seems like things work so far.
These appear on
https://example.com/git/
when logged in and looking at my dashboard. Likely because there are no general repos, only one within an organization and rather than checking for that, it is queried anyway.Set up
I downloaded a prebuilt package that did not come with static assets, so I built those from the source repo but could not figure out where to put them so they could be served by the embedded server. I also couldn't enable enough logging to see the complaints on individual files. Enabling access logs and trace level logs in app.ini didn't actually give me per asset logs and errors.
Nginx config
Gitea config
Last 1000 lines of the gitea log.
gitea1000.txt
Gitea Version
1.16.8-1
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
2.30.2-1
Operating System
Debian stable
How are you running Gitea?
Gitea 1.16.8-1 debian package from https://gitlab.com/packaging/gitea
No static assets included, so I built them after downloading the repo.
Running on a debian linux VPS w/ a sysvinit script.
Proxy via nginx 1.18.0-6.1.
Data stored in mariadb 10.5.15-0.
Database
MySQL
The text was updated successfully, but these errors were encountered: