I have set up a new droplet on Ubuntu 20.04 (LTS) x64 and have successfully installed the nginx mysql php lemp stack. Got two websites working on it and I have cloned the git repo for another ready to go live. I would like to test this one to make sure all is working ok before I update the nameservers. Is it possible to preview it in a browser somehow without changing the default site settings. To be honest I tried changing that and browsed to the IP of the droplet and it didn’t work. Any ideas? Thanks in advance.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hello, @lukep11a
You can simply edit the hosts file locally on your PC and server the website content from the DigitalOcean droplet.
The location of the file on Window / MacOs are:
You can open the file in any text editor like Wordpad, Notepad and add the following line in the file:
DropletIP domain.com www.domain.com
On Windows, you need to run Wordpad or Notepad with administrator permissions (right-click -> run as administrator).
On MAC the best way to edit it is using terminal and typing “sudo nano /etc/hosts”, then adding the line and pressing Ctrl+X.