Next.js Discord

Discord Forum

NextJS Project deployed on Vercel with MixedContent error

Unanswered
Smew posted this in #help-forum
Open in Discord
SmewOP
Does anyone know how i can install SSL certificates on a GCP Compute Engine VM?

I have an app that's deployed on Vercel + Supabase, with a separate machine learning model that's being served via FastAPI on a Compute Engine VM. However, when im calling the FastAPI endpoint from my app on Vercel via VM_IP:8000/chat , im getting a MixedContent error which i've googled and found is related to calling a http from https. I'm pretty sure that i have to install a SSL certificate on my VM instance and use that together with my FastAPI endpoint but im unsure as to how i should go about that exactly my google-fu isn't helping.

My domain DNS from namecheap is currently being pointed towards Vercel, so im not sure what i should be doing since the few articles that i've found online require me to have my website on GCP on a server(nginx,etc) and for me to point my DNS to the GCP vm instance instead of Vercel?

Any help would be GREATLY appreciated

1 Reply

Fire ant
You need new domain for your compute VM, and install nginx + ssl cert on your compute VM. Use nginx reverse proxy to proxy your localhost/ip to your new domain.

Configure nginx with your new ssl cert, you can use certbot or letsencrypt cert

Point your new domain to your compute VM ip, use A record. Just buy any cheap domain for your api, it doesn't matter