I'm using Forge to manage several websites, however when I type in the domain of one my websites, I get directed to another website on my server. E.g. I visit www.website1.com, but instantly get redirected to www.website2.com.
I'm also using Cloudflare for DNS, and all the websites have been created on the Forge website, so haven't manually edited the Nginx files.
This has happened on a few occasions, can anyone point a light on to why this happens and how to fix it?
I would not post anything that could possibly be used to thwart security on an open forum. I assume that both of your DNS entries have the same IP address. The second thing to compare is in the .env of each to be sure that the APP_URL values point to the specific URL and not to an IP address like below.
I've just checked the website over a proxy and it is loading - but it's trying to load the SSL certificate of the first website in Forge (alphabetical order), so it's website2.com - trying to load SSL of website1.com. Hopefully this is narrowing it down :)
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
I've just started using Origin SSL certificates with Cloudflare, could this be causing a problem?
I don't know about Cloudflare's certs but I assume that you have uploaded them onto your server through the Forge interface. If Nginx wont restart I would expect that you have accidentally made a change to the file.
Thanks for all your help :) Unfortunately I think it could have been down to me pasting the certificate in to the private key field on one of the websites!
It has happened previously - a different site being served, but I'm assuming this is Nginx needing restarted, so I will make a note in the future to make sure Nginx is restarted to avoid any cache issues.