Question

How To Host Multiple Sites Using VestaCP

Hi guys, i wanted to know how can i host multiple sites on my dedicated server. I am currently hosting 1 site on it using VestaCP and its running fine and well. I have only 1 Ipv4 address. So i really have no idea how can i host another site, there is option for a 2nd domain at vestaCP but how that points to the directory i dont know anything. Can you guys please give me some starting hints? Thanks

Subscribe
Share

Submit an 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.

Accepted Answer

Hi @Zulqarnainkhan

You can host multiple domains on the same IP.

I have never used VestaCP, but it should be pretty straight forward from what I can read in this tutorial. Simply click the WEB menu and click the green + button. https://www.digitalocean.com/community/tutorials/how-to-install-vestacp-and-set-up-a-website-on-ubuntu-14-04#step-3-—-setting-up-a-website

@Zulqarnainkhan

The issue with custom name severs is that you need to, ideally, setup multiple IP’s – one for each of the name servers you create. Since DigitalOcean only technically allows a single IP per Droplet, this isn’t possible. The purpose of using multiple IP’s is for redundancy – should one of the name servers go down, the other can pick up the requests.

That being said, custom name servers require registration with your registrar.

You can set your domains DNS to any name servers(s) you wish, valid or not, and the registrar will do as you tell them without actually confirming if they are valid (some do, most don’t).

The best option would be to set your domains DNS to use:

ns1.digitalocean.com
ns2.digitalocean.com
ns3.digitalocean.com

That will allow you to add your domain through the DigitalOcean Dashboard and manage your DNS entries for each domain there.

Once your domain has been added, you can add your A, CNAME, MX, TXT, AAAA, and other DNS records.

You’d then point the main A entry for your domain to your Droplet IP. Optionally, you’d add a CNAME for www and point that to your domain, like so:

A          @          DROPLET_IP
CNAME      www        domain.com

That’ll make the setup much easier and get things working for you far quicker without having to worry about setting up private name servers (or vanity name servers, depending on where you look).

@hansen i got this result can you please explain ? http://prntscr.com/f7gf43

@hansen can you please tell me with what did you or how did you checked the nameservers?

Hmm ok thanks alot.

And one more thing @hansen my website had SSL activated over its domain on the old server and its still active, i am putting the website in public_html there is another folder public_shtml, that one is for SSL or i dont know what, should i be putting the website in that folder?

The big problem here is that i cant point the domain to droplets IP because there is no option at all of A record, There is no DNS panel even. SO thats why i have used the private nameservers have a look at the below screenshot http://prntscr.com/f7e5ja

And for the 2nd option i think thats what i have to do. To use Digitalocean NS. So i think thats what i have to do