Hi guys, Is that possible to point <cal.com> to a ...
# developers
v
Hi guys, Is that possible to point cal.com to a sub-path of a domain? Seems like the standard NextJS
basePath
approach won’t work at all. Any ideas?🤔
z
Are hosting on Vercel?x
v
Nope, Cloudfront -> EC2. Even URL rewrite fails.
z
I would need more context then. What is the actual problem? What are some possible solutions that you already tried and didn't work?
v
Well, we tried to set up rewrites via Cloudfront, it almost works, but right after the app loads it crashes. We tried to add
basePath
in
next.config.js
, the application builds but crashes immediately during browsing. We put Nginx in between, but not only did it stop working, also having two reverse proxies in a row was a bad idea from the start and we did it just out of curiosity. As a last resort we naively pointed NEXT_PUBLIC_WEBAPP_URL/NEXT_PUBLIC_WEBSITE_URL to http://domain/subpath, it won’t work, which was predictable. Seems like a dead end.🙄
z
So you're pointing to both a subpath AND a subdomain?
v
Correct. The idea is to have http://app.example.com/cal as a logical part of the whole application hosted on http://app.example.com. They might (and will) be hosted separately, basically http://app.example.com is a bunch of serverless micro frontends.