r/devops 2h ago

Troubleshooting 404 Error transferring GitLab CI artifacts to Linux Webserver: Are directories starting with __ ignored?

Hi everyone,

first off, if this isn't the perfect subreddit for this issue,please let me know if I should ask this elsewhere! Thanks in advance :)

We are hosting a custom R package repository and getting a 404 Not Found error in our browser when trying to access this URL:

http://our-ip:8090/__api__/filter/packages

Our Setup:

1)CI/CD: GitLab Pipeline (Runner on Windows, PowerShell).

2)Target: Docker container on a Linux server (Port 8090).

What we know:

1)The deployment job copies everything to a public folder and saves it as an artifact.

2)Checking the artifacts in GitLab UI, the file perfectly exists under public/__api__/filter/packages.

3)The pipeline works correctly.

The Problem:

When requesting the URL directly in the browser, the webserver returns a 404. Our hypothesis is that either the deployment transfer from the GitLab artifact to the Linux/Docker server silently drops the __api__ folder, or the webserver (Nginx/Apache) blocks access to folders starting with double underscores by default.

Has anyone experienced files/folders with __ being ignored during GitLab artifact transfers or blocked by default Linux webserver configs? Any hints on how to debug this?

Upvotes

2 comments sorted by

u/quiet0n3 1h ago

Have you even looked at the web server logs, contents of the container, or web server config?

Come one pal, if you can't even check if files exist how do you expect help?

u/Faye-Vozora 52m ago

Double underscores are not hidden on Linux, so I would first prove where the directory disappears. Check the artifact archive itself, then run find inside the target container and curl the path from inside the container. If it exists there, compare the web server document root and any location, alias, rewrite, or try files rules, then check the access and error logs for that request. A 404 with the file present is usually a routing or root mismatch, not the underscores.