I am trying to configure a setup, where gitlab-pages is being server from separate gitlab instance. I have followed steps described in official docs (all with NFS shares, and same UIDs on both instances for git user etc.), but at the very end when I try to access the site, I get HTTP 500 gitlab error.
My logs on gitlab-pages instance (I've replaced proper domain in logs with username.pages.mydomain.com):
{"error":"permission denied","level":"error","msg":"requested filepath \"/mnt/pages/@hashed/db/b1/dbb1ded63bc70732626c5dfe6c7f50ced3d560e970f30b15335ac290358748f6/pages_deployments/1/artifacts.zip\" not in allowed paths: \"/var/opt/gitlab/gitlab-rails/shared/pages\"","time":"2021-05-10T11:50:17Z"}
{"error":"httprange: new resource 403: \"403 Forbidden\"","host":"username.pages.mydomain.com","level":"error","msg":"vfs.Root","path":"/pages-test","time":"2021-05-10T11:50:17Z"}
{"content_type":"text/html; charset=utf-8","correlation_id":"01F5B1T63QV5FGFRGR6YPYWWXM","duration_ms":6,"host":"username.pages.mydomain.com","level":"info","method":"GET","msg":"access","pages_host":"username.pages.mydomain.com","pages_https":true,"pages_project_id":132,"pages_project_prefix":"/pages-test/","pages_project_serving_type":"zip","proto":"HTTP/1.0","referrer":"","remote_addr":"210.135.57.148","remote_ip":"210.135.57.148","status":500,"system":"http","time":"2021-05-10T11:50:17Z","ttfb_ms":6,"uri":"/pages-test","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36","written_bytes":2905}
Stuff I have checked:
- Gitlab CI/CD creates new static files with proper permissions and user git on both sides can read and write from that directory
- gitlab-secrets.json is the same on both instances (as the documentatin suggested)
- Project scope is public (no access control)
The error seems to be pointing at filepath error but I could not find any info on the internet about that.