calcom / cal.com

Scheduling infrastructure for absolutely everyone.
https://cal.com
Other
32.28k stars 7.94k forks source link

Cal.com self-hosted gives 404 even when username is registered #13572

Open adityapatadia opened 9 months ago

adityapatadia commented 9 months ago

Tried to self-host cal.com using docker but it gives 404 error whenever we try to visit the user page by clicking "View Public Page" button.

PeerRich commented 9 months ago

can you record a loom video? cant reproduce this locally

PeerRich commented 9 months ago

there is a chance your .env variables are not correct whats your NEXT_PUBLIC_WEBAPP_URL and NEXT_PUBLIC_WEBSITE_URL ?

AndreaZoppi commented 8 months ago

Good afternoon PeerRich, I hope it's fine if I join this thread. I have been using the docker version o Cal.com since 9 months and with the last pulls i started having the same issu as well. I tried to move everything on a new machine, with a new database, modifying all the settings I could to no avail.

there is a chance your .env variables are not correct whats your NEXT_PUBLIC_WEBAPP_URL and NEXT_PUBLIC_WEBSITE_URL ?

After coming across this issue I tried adding "NEXT_PUBLIC_WEBSITE_URL" as it wasn't present in my .env but nothing changed. I uncommented the old variables but still not a change. As of now, this is part o my .env:

BASE_URL=https://booking.mydomain.com NEXT_PUBLIC_APP_URL=https://booking.mydomain.com NEXT_PUBLIC_WEBSITE_URL=https://booking.mydomain.com NEXT_PUBLIC_WEBAPP_URL=https://booking.mydomain.com ALLOWED_HOSTNAMES='"mydomain.com"'

mydomain.com i just a plceholder I'm using here to void sharing my real domain, it isn't the same value I have in the .env file.

I'm available in case you need more info.

Thanks in advance!

adityapatadia commented 8 months ago

What I have figured out is that if we remove ALLOWED_HOSTNAMES thing from env, everything works fine.

AndreaZoppi commented 8 months ago

I tried commenting that line from the .env file and it seems to be working just fine now, thought the log keeps recording warnings:

calcom-1 | @calcom/web:start: 10:02:52:841 WARNorgDomains.ts Match of WEBAPP_URL with ALLOWED_HOSTNAME failed { calcom-1 | @calcom/web:start: WEBAPP_URL: 'https://booking.mydomain.com', calcom-1 | @calcom/web:start: ALLOWED_HOSTNAMES: [] calcom-1 | @calcom/web:start: }

drajabr commented 7 months ago

12201 Seems related, as it appears you're hosting the app under a subdomain.