Setting Up New Document Root Directories

Posted September 22, 2021 93 views
NginxUbuntuGetting StartedUbuntu 16.04

I have one doubt 🧐…how can I add another site IP and domain in local host of nginx..this is only for poc..

I add and save that ip and run but it raises ssh error..but for fake ip that error doesn’t araises..

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.

Submit an Answer
1 answer


Each Droplet comes with one public IPv4 address. But you could still have multiple domain names hosted on the same server with Nginx by using Nginx server blocks.

You could follow the steps on how to do that here:

Let me know if you have any questions.

by Justin Ellingwood
When using the Nginx web server, server blocks (similar to the virtual hosts in Apache) can be used to encapsulate configuration details and host more than one domain off of a single server. In this guide, we'll discuss how to configure server blocks in Nginx on an Ubuntu 16.04 server.