Subdirectory for self hosted

Is it possible to run ghost blog on .xyz Domain Names | Join Generation XYZ using manual setup? I have xyz.com which is a nextjs project and deployed using vercel and I want my .xyz Domain Names | Join Generation XYZ to be powered by ghost server.

I tried the configuration provided for nextjs in this Using Ghost(Pro) with a subdirectory but I end up in too many redirects. I am doing all this in self hosted ghost server

Any help would be appreciated

Thanks