## Description Album detail pages (`/project2/album/:id`) return an Apache 404 on the VM (http://it2810-19.idi.ntnu.no/project2/), even though they work locally. The client builds its links from `import.meta.env.BASE_URL` (`AlbumCard.tsx`, `AlbumDetailPage.tsx`, `App.tsx`), so opening an album is a full page load of `/project2/album/<id>`. Apache looks for a file at that path, finds none in `/var/www/html/project2`, and returns 404 before the app can handle the route. The Vite dev/preview server falls back to `index.html` automatically, which is why it works locally. The Apache config only has the `ProxyPass /graphql` rule documented in `docs/VM-setup.md`, so there is no fallback. Vite `base` is already `/project2/` (`client/vite.config.ts`), so the build looks right. What is missing is the server-side fallback. ## Tasks - [ ] Add a fallback so unknown paths under `/project2/` serve `/project2/index.html`, using one of these: - `client/public/.htaccess` with `FallbackResource /project2/index.html`. The deploy job already copies `client/dist/.` into `/var/www/html/project2`, so it ships with every deploy. Requires `AllowOverride` (at least `Indexes FileInfo`) for `/var/www/html/project2` on the VM. - `FallbackResource /project2/index.html` in a `<Directory /var/www/html/project2>` block in the Apache site config on the VM, then `sudo apachectl configtest && sudo systemctl reload apache2`. - [ ] Check that `/graphql` (ProxyPass) and static assets under `/project2/assets/` are unaffected - [ ] Add a check to the deploy job in `.github/workflows/ci.yml` that `GET /project2/album/1` returns 200, next to the existing `GET /project2/` check - [ ] Document the fallback in `docs/VM-setup.md` ## Acceptance criteria - [ ] Opening or refreshing `http://it2810-19.idi.ntnu.no/project2/album/<id>` loads the album page instead of an Apache 404 - [ ] Clicking an album from the search page works on the VM - [ ] `/graphql` and static assets respond as before - [ ] The deploy job fails if a deep link returns 404 ## Related issues - #44 Deploy the server build (the deploy job that publishes to Apache) - #11 Support base paths