Serve built public assets under the /project2 base path #14
+11
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What was wrong
The site loaded at
/project2/but every asset 404'd. The SSR HTML references assets at/project2/assets/...(Vitebase), but the Nitro server bakes its static-file routes from its ownbaseURL, which defaults to/— so it only served/assets/*, and Apache's passthrough proxy returned the Node server's 404.The fix
baseURLto/project2/invite.config.ts, so the built server serves its public dir under the base/project2/assets/**keeps the immutable one-year cache header (Nitro's automatic rule is generated without the base)/about, also produced by hardcoded links) now 307-redirect to/project2/aboutinstead of 404Verified against a fresh build
/project2/,/project2/about/,/about/project2/…Dev mode still works at
localhost:3000/project2/. No Apache changes needed — the existingProxyPassconfig is correct; this was purely on the Node side. Merging auto-deploys via the workflow.