Portal Home > Knowledgebase > Articles Database > 2 Domains on One Nameserver


2 Domains on One Nameserver




Posted by mrgeppetto, 09-28-2015, 03:53 PM
Hello, I am fairly new to webhosting and using a VPS. My question is how do I run 2 domains on one VPS using cpanel. I tried to just add an account in cpanel and so far I don't think its working. Both my domains are hosted off godaddy and I'm using a vps with Arvixe. I tried to just change the nameserver on godaddy to the one provided for me on Arvixe but only one website is working. Any help and is there a way to can kind of partition my VPS so that I can control how much resource can go into each domain. What is the best way to provided different cpanel accounts since I have multiple people logging into my cpanel to work on various aspects of each website. I don't want them seeing my other projects or being able to sniff through it.

Posted by CanSpace-Martina, 09-28-2015, 04:10 PM
If you have VPS, you should have WHM too, do you have it? If you wish to have cPanel account specifically for this domain, you'd need to add this domain trough WHM ( Create new account ) also you'd need to have registered nameservers so each domain you add via cPanel or WHM can use those nameservers. This is for the start. I'd suggest you to check on cPanel documentation on how to set up DNS for your VPS and how to add new domains/create new accounts. This might help you as well: https://documentation.cpanel.net/dis.../DNS+Functions https://manage.dediserve.com/knowled...whm---cpanel-/ If you don't have WHM only cPanel, then you will not be able to add domains to have their own cPanel account. You can only add them as addon or parked domains.

Posted by mrgeppetto, 09-28-2015, 05:41 PM
Ok so I made an account VIA WHM for the cpanel for my 2nd website but I only have one set or registered nameservers for the website that I primarily registered with. Will I need another nameserver pointing to my otherwebsite, I can't use one nameserver for both (I mean it doesn't make sense to me but I'm new at this so I just want to make sure i didnt miss anything).

Posted by SSD-Greg, 09-28-2015, 09:57 PM
Yes you use the same name server for the secound account and so on. For example say I have name server ns1.myside.com I have two domains one abc.com and another separate domain on another account on same server [cpanel account] I'll also use the same name server. Think of it as a main domain for your server so that then the accounts domain know to loook at that server to find the account with their domain so then it can bring you to the site / data. You don't need to make a new name server for every other cpanel account and so on. It's just like a gateway so the domain knows to look for its name on that server . It's pretty simple. I suggest you search Google and youtube on how does web hosting work etc

Posted by DivinePrad, 09-29-2015, 04:50 AM
If you have a VPS and two nameservers resolving to the same VPS, then no matter how many domains you host on that VPS, all of them can use those two nameservers. If you are referring to memory, CPU etc you can probably use cloudlinux. If you are referring to disk space, bandwidth etc, you can create packages from WHM and assign that package to the domains. If various people are working on the same website, then you can create multiple FTP accounts with access restricted to their home folders alone. If projects are different, then it is always better to create multiple cpanel accounts(websites).

Posted by mrgeppetto, 09-29-2015, 05:12 AM
Ok so as of right now none of my sites will load when you try to just enter the domain on the browser, although when I access WHM and go to my accounts, when I click the accounts IP address I am able to see the website. I'm just not sure what I'm missing, both domains are pointed to the hosts nameserver. Also out of curiosity I went to restart services and reststarted DNS Server and got some errors. Starting named: Error in named configuration: /etc/named.conf:110: unknown option 'vi' /etc/named.conf:116: unknown option 'ew' /etc/named.conf:155: unknown option '' What am I missing.

Posted by DivinePrad, 09-29-2015, 05:31 AM
Just check the lines mentioned in the error and see the problem. Looks like there is some mistake in the conf.

Posted by mrgeppetto, 09-29-2015, 06:06 AM
Thanks! I think I got that fixed now relies my 2nd website issue I think it all lies within where the directory is. Should it be under root because it has its home directory. so my directories go something like this 1st website: home/username/public_html/website one 2nd website: home/website 2 Is that where the problem is?

Posted by DivinePrad, 09-29-2015, 06:38 AM
I am not clear what issue you are facing related to this. Are the sites not working over browser? Please send me a PM, if you want me to take a look at it.

Posted by mrgeppetto, 09-29-2015, 08:08 AM
Yes I can only get one website to work and I was wondering was it because the other one isn't in the same directory? both domains are pointed at the same nameservers.

Posted by DivinePrad, 09-30-2015, 02:27 AM
You need to make sure that the DNS settings are correct, virtual host settings are correct and the domain is pointing at the correct document root, ownership and permission are correct etc.

Posted by mrgeppetto, 10-01-2015, 01:11 PM
Thanks everyone for the help! turns out the named.conf was corrupted and I actually just learned a lot since my vps provider arvixe has pretty horrible support (thought having a fully managed vps would at least mean that if you are running into issues an admin can help you right away). But I learned how to use SSH and moved the original conf and got it rebuilt and now both my sites are working. I'm pretty stoked since I've never done that or worked with SSH before.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
FTP Problem (Views: 467)