cal.diy icon indicating copy to clipboard operation
cal.diy copied to clipboard

Signup or login redirects to localhost:3000

Open javihache opened this issue 4 years ago • 2 comments

I have deployed cal.com on a VPS Ubuntu 22.04 using nodejs 16.18. After I set up the database and a reverse proxy with the following config:

`server { listen [::]:80; listen 80;

server_name cal.mydomain.com;

location / {
    proxy_pass http://localhost:3000;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Forwarded-Port $server_port;

}

}`

I can open cal.mydomain.io and login. However the Signup button redirects my browser localhost:3000. I thought it was a problem with my nginx proxy manager being in docker, but I tried installed nginx via APT and the same issue occurs. In my .env file, all PUBLIC URLs are correct pointing to the public URL of the server. Also if I enter the URL cal.mydomain.com/signup

I get the uploaded screen with the localhost:3000 as domain for the desired username. That all looks wrong to me as if somewhere in the .env file the Public URL is not being loaded properly.

Any ideas how to fix this?

Screen Shot 2022-10-21 at 11 35 29 AM

javihache avatar Oct 21 '22 09:10 javihache

Found the problem. If I do yarn build with the wrong URL values (localhost:3000) for the first time after git cloning the repository, even if I change the URL to the right ones afterwards and build again, localhost:3000 sticks around in the code and leads to the problem described. Is there a way to completely reset the configuration after building for the first time?

javihache avatar Oct 21 '22 12:10 javihache

Did you played with the environment variabels?

We are facing the same issue in our instance and I trying to figure out how to fix that issue without clonning again.

satonotdead avatar Nov 14 '22 08:11 satonotdead