By Marko Radak
Hey guys,
I’ve just signed up for DO and I’m currently trying to understand ‘how stuff works’ here, as I’ve been using only shared hosting planes so far.
Basically, what I would like to achieve (In a perfect world) would be to have next: A single droplet with a zPanel running more than one site.
I’ve managed to install zPanel successfully, and to set up a part of it. What I’m currently trying to achieve though, is to have my IP point to the actual content, instead of zPanel. I would later on add the domain, as I have my live site still hosted somewhere else, and I don’t want to mess with the DNS and have the site down for some time. I also want to test this around and get a hang of it, before actually hosting something live. Therefore, my main question would be next.
Is it possible to have a couple of different sites managed like this: /public_html/site_1 /public_html/site_2 /public_html/site_3
And having the ‘domains’ of those sites something like xxx.xxx.xxx.xxx/site_1 (where x’s stands for IP). And of course, later on to substitute those ‘domains’ with the actual domains.
I know this is a true newbie question, but I really don’t know where to start :)
Hope you guys understand! Marko
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!
Yeah sure you can, I don’t know if what I post here is still valid cause from what I found from a little search it was from December 2013. So what I found is that if you open your zpanel and go to Domain Management and add a new domain you can add your domain and choose the directory of your domain for example: <br>domain1.com points to directory /public_html/site_1 <br>domain2.com points to directory /public_html/site_2
Hi Marinos, <br> <br>Thanks for getting back to me. <br> <br>Yes, I think that’s what I understood from it as well. In that case, I guess I should point DNS for my domains to DO DNS, right? <br> <br>Also, is there a way to preview the ‘live site’ without having any domain connected to it? <br> <br> <br> <br>
It’ll be best to test your new DO installation before changing your DNS settings. So what you can do is below. This will be for Windows 7, but it may be similar on other versions. <br> <br>1) Open up C:\Windows\System32\drivers\etc\hosts <br>2) Hosts is the file you’ll modify. In it, you should see IP addresses and domain names, such as: <br> <br>127.0.0.1 adobe-dns.adobe.com <br>::1 localhost <br>127.0.0.1 localhost <br>127.0.0.1 localhost <br> <br>Add your droplet’s IP address on the left, your domain name on the right. Do this for every domain you’re testing. All it takes is one space between the IP address and domain name, nothing else needs to be done. Save the file. <br> <br>3) Click the Start button and search for “cmd” without the quotes. Open that. Here, type in: <br> <br>ipconfig /flushdns <br> <br>4) Now your domains will be pointing to DigitalOcean (only on your computer and nowhere else. Nobody will see the change but you). Make sure you have your sites all set up through DO, and you can view them by typing in their URLs. <br> <br>5) Test, and if everything seems good, go ahead and point your DNS to DigitalOcean. Go back into the hosts file, remove those IP address and domains you added, and then flush the DNS again.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.