I have setup 2 sites on one Digital Ocean droplet using Forge:
/home/forge/site1.com
/home/forge/site2.com
My issue is that I have only just updated the DNS to point to the newly created server. Is there a way I can view the sites using the IP address to make sure everything is working ok?
@peterdickins did you ever checked cloudflare? You can register your domain there and then let cloudflare handle all of your dns stuff. The beauty of it is that any change to IP will be more less visible immediately everywhere in the world.
Edit the hosts file on your local machine. On unix based systems it is usually located at /etc/hosts. For Windows it should be C:\Windows\System32\Drivers\etc\hosts but you can Google cause I might be wrong.
Edit /etc/hosts by opening it with user that has admin access
Add lines for both sites in following format 123.123.123.123 site1.com and 123.123.123.124 site2.com
Overwrite that file by saving it
Open incognito mode and type in site1.com in your browser
Note: replace 123.123.123.123 and 123.123.123.124 with actual IP addresses.
This can be done by just adding 'default_server' to your nginx block. This is what is shown for the 'default' site when you first create a forge server. It will only work for 1 site at once though for testing.