Hey guys, I have a droplet on DO which contains a Laravel project I've installed on a domain using Laravel Forge.
Today, I have cloned a git of a wordpress site I want to put on my droplet, but for some reason after cloning it using Forge (and setting it's domain using forge's input to a domain I have purchased), uploading my DB dump to the new database I've created for that wp site using Forge, whenever I go to the new domain, I get referred to the other domain which runs laravel.
Do you guys have an idea why does that happend? I had removed "/public" from nginx config (root path) of the site (using forge tab on the bottom of a site apps page)
@dabnad How did you add the new site? Did you do that using Forge? Also you need to make sure your DNS is pointing to the correct server with the correct records.
@bobbybouwmann Hey bobby, I have created the site using Forge, and I had updated the DNS as well. the droplet is the only connection between the two domains. besides that, when the config didn't contain the right db credentials, a database connection error was displayed with no referring to the other domain.
Thanks =]
@dabnad Mmmh that should just work out of the box. Did you update anything in your nginx setup on the server manually? That could be an issue somehow. I can't really see what you have right now, so it's hard to figure out what is going wrong here!
@bobbybouwmann Doesn't it require a virtual host setup or something? cause it seems like that's the problem.. I don't see another reason it would redirect to the other domain - they have nothing in common.
And I only removed "/public" on the nginx config, since it didn't even display the db error before I've done that. anyways, I had written it back.
Forge creates a nginx file for each site. So on the server in the /etc/nginx/sites-available directory you should see a file for each site. If it's not there then that's your problem ;)