404 for Repository Page #5817

Closed
opened 2025-11-02 06:36:46 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @HerrHase on GitHub (Aug 2, 2020).

  • Gitea version (or commit ref): 1.12.3
  • Git version: 2.17.1
  • Operating system: Ubuntu 18.04
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

That's really strange, all other Repository Pages are Working, but i have one, i get always a 404 from Nginx, not from Gitea,

If the url looks like this, i get a 404
crispy-css

If i change the ending, i get the page
crispy-css/

If i change the name, i get the page,
crispy-csss

I have no idea how to track this down, there is no entry in the logs about this.
...

Screenshots

Originally created by @HerrHase on GitHub (Aug 2, 2020). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.12.3 - Git version: 2.17.1 - Operating system: Ubuntu 18.04 - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No - [ ] Not relevant - Log gist: ## Description That's really strange, all other Repository Pages are Working, but i have one, i get always a 404 from Nginx, not from Gitea, If the url looks like this, i get a 404 crispy-css If i change the ending, i get the page crispy-css/ If i change the name, i get the page, crispy-csss I have no idea how to track this down, there is no entry in the logs about this. ... ## Screenshots <!-- **If this issue involves the Web Interface, please include a screenshot** -->
Author
Owner

@Masgalor commented on GitHub (Aug 3, 2020):

I would assume you have a location block similar to this one in your nginx config.

location ~ (css|js|img) {

        try_files $uri $uri/ =404;

} 

That would match crispy-css and return 404 since its not a file.

@Masgalor commented on GitHub (Aug 3, 2020): I would assume you have a location block similar to this one in your nginx config. ``` location ~ (css|js|img) { try_files $uri $uri/ =404; } ``` That would match `crispy-css` and return 404 since its not a file.
Author
Owner

@HerrHase commented on GitHub (Aug 3, 2020):

Even worse! It was a default include file with "expires" statements, for static files i used a alias, but the "expires" statement handle it like a file that never showed up. Thank you! I feel a little bit stupid... :D

@HerrHase commented on GitHub (Aug 3, 2020): Even worse! It was a default include file with "expires" statements, for static files i used a alias, but the "expires" statement handle it like a file that never showed up. Thank you! I feel a little bit stupid... :D
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5817