Install Multiple Ghost on single server, still shows first site on front end only

Right now, I’ve got https://www.tadaudio.ltd/ running perfectly and I’ve gone through the exact process to set up a second site in a new folder for http://www.tadstudios.co.uk/ but am not ready to move the DNS from the original site over to digital ocean until the ghost configuration is working. If you edit your hosts file to www.tadstudios.co.uk with the IP 206.189.120.44 you should see what I’m seeing.

What’s happened is that the back end is showing the new headless CMS but the front end is showing the first site and won’t change over. The nginx details are all fine, the database is updating fine, so I’m not sure what’s causing this!

I’m using version 2 of ghost, latest copy on digital ocean, Ubuntu version 19.04. That does bring up Ubuntu version complaints, I’ve found, but surely that shouldn’t be causing this?

Hi @melphinstone. I’m guessing from when you mentioned “headless CMS” that you’ve got a custom front-end for these sites? Could it be that you’re uploading the same front-end to both URLs? The front-ends needs to be uploaded to a platform that has build hooks and deployment credentials, so the front-ends use different content

No, I’m just referring to ghost for what people refer to it when talking about a headless CMS (it’s just a buzz word). The front end is dynamic as is the content that is loaded. I am using “posts” as a component to load the front page and that uses the “featured” property via #get. I have not uploaded the custom theme I created yet to the second version of ghost so it should still look like “casper” on the second new one.

Oh ok cool. Are you able to provide more information? This is hard to debug without knowing the entire setup. Are you sure it’s not an issue with domain configuration?

It sure sounds like an NGINX issue - I have multi-ghosts running on the same server fine.
You do need to create a DNS entry for the test site e.g. test.tadstudios.co.uk and set up NGINX to serve that as well as www.tadstudios.co.uk. This is because Nginx uses the requested name to identify which site to show. Don’t do the HTTPS/SSL certificate until you have switched over.

2 Likes

Aha, so I need to set an A record beforehand and test against that? I hope that’s it because this has been a little unexpected. The back end is behaving like all is fine on that IP.

I find with digitalocean and setting up a special ghost / Ubuntu rig that it won’t let me refuse to set up SSL and busts the config also so I have to flip to the directory and run as ghost-mgr but that’s a side issue. Did you rig up yours from scratch or use digital ocean or some other?

I usually prefer to setup the DO droplet from scratch rather than use the 1-click install.

It makes the setup much more clear when you have to plan all your Ghost sites from the start rather than just try to duplicate an initial site that might have some config spot left missing somewhere.

Things to check in your nginx configs:

  • the root folder is not the same across your ghost sites
  • the domains are configured properly

Hello,

True. And even better, you can spin up a DO RancherOS dropplet and run disposable Ghost containers. Pretty awesome!

The hardest part is the initial provisioning and docker compose configuration to connect all nginx, let’s encrypt companion and the ghost containers.

Happy coding!

Turns out everything ran fine as soon as the domain was completely rigged up. I didn’t have to do anything.

I would say this is worth looking into in terms of people testing out hosts files as NGINX plus the digitalocean setup was definitely the issue.

@jeff had the right fix with setting up DNS beforehand with a subdomain, so maybe it’s totally user error :laughing:

1 Like