Multiple domains on VPS

Discussion in 'Linux VPS/Dedicated - cPanel' started by bubinski, Mar 18, 2009.

  1. bubinski

    bubinski New Member

    I'm trying to understand the basic concept of how to run two domains on my VPS. My present situation is that I have one domain running. I've recently purchased another domain name which I probably will run later on my VPS. I'm not a reseller but looking only to run two domains from my VPS.

    So I'm reading everything I can find about doing this, which frankly confuses me more because all this DNS stuff has been the most confusing to me of all the stuff I've had to learn about running my own VPS. At this point I'm just trying to get the basic outline about how to accomplish this.

    Since I have two IP addresses I assume I should use 1 IP for one website and the second for the 2nd website (IP-based hosting). Which starts me off with a question about the registrar. Presently I have my present website set up at the registrar's nameserver setup as:
    ns1.mywebsite1.com pointing to xx.xxx.5.120
    ns2.mywebsite1.com pointing to xx.xxx.6.120
    I'm wondering if when I register my second website I should drop the second nameserver for the first website and setup my second website as
    ns1.mywebsite2.com pointing to xx.xxx.6.120.
    I have seen reference made to leaving the first website alone as is and adding second website nameserver setup as:
    ns1.mywebsite2.com pointing to ns1.mywebsite1.com
    ns2.mywebsite2.com pointing to ns2.mywebsite1.com

    For my server setup my understanding is that I need to change my http.conf file to add something similar to:

    Listen 80

    <VirtualHost xx.xxx.5.120>
    DocumentRoot /www/mywebsite1
    ServerName www.mywebsite1.com
    </VirtualHost>

    <VirtualHost xx.xxx.6.120>
    DocumentRoot /www/mywebsite2
    ServerName www.mywebsite2.com
    </VirtualHost>


    But I'm also not clear whether its better to use this ip-based virtual host method or the name-based virtual host method.

    And finally I assume you have to add a second DNS zone for the second domain?

    Any information about the basic outline involved in accomplishing this would be appreciated. Thanks in advance.
     
  2. Dan

    Dan Moderator

    Hello Bubinski,

    First the question is why do you need dedicated IPs for each domain? Normally reasons would be things like I need an SSL certificate and it requires a dedicated IP#.

    You can run literally hundreds of domains on a single IP now. Simply define the package in WHM then create the account and you're done. The system creates the DNS zone files and everything automatically for you all you have to do is upload your content. No editing of httpd.conf required :)

    As far as the nameservers go you can use your existing ones or create new ones for the new domain. For simplicities sake I'd say just use the existing ones since you have A records created and already have them created with your registrar.

    There is also a post in the tutorials section about new VPSs and setting up domains that might help you out as well.

    Hope that helps!
     
  3. abhishek1711

    abhishek1711 New Member

    do u provide separate ftp access for multiple domains on one vps account
     
  4. bubinski

    bubinski New Member

    Thanks for the info Dan. I decided to go with the dedicated IP because I plan later on down the road to use an SSL certificate on the new website. I'll try to find the tutorial you mentioned.
     
  5. Dan

    Dan Moderator

    Abhishek1711,

    Yes you can create multiple ftp logins in the cPanel for the domain.

    Typically the 2 IPs that come with your VPS are used for the nameservers and one for the shared IP for the system. If you use one as a dedicated I do not think you can run 2 nameservers and the shared IP on the second. My suggestion would be to go shared for now and then when the day comes get another IP from KH. I do not think that 'I will need SSL in the future' will be enough justification to purchase an additional IP. You could try of course that is simply my thinking :)
     

Share This Page