Setup for multiple domains on same VPS

Hi

We have 20 domains into a VPS and have two IPs allocated.

How do we go with setting up DNS for each domain?

1) We already have one wordpress installed on http://www.sample.com . We can assign fixed IP to this domain from our VPS

2) Regarding other 19 domains, do I have to create A record on their domain mgt. and link it back to the fixed IP of the http://www.sample.com domain?

3) How do we do domain mapping after?

Please note all the 19 domains share same IP and http://www.sample.com has differnt fixed IP.

  • Vinod Dalvi
    • WP Unicorn

    Hi Bill,

    Welcome to the WPMU Dev community and thank you for your questions.

    2) Regarding other 19 domains, do I have to create A record on their domain mgt. and link it back to the fixed IP of the http://www.sample.com domain?

    Yes

    3) How do we do domain mapping after?

    If you are using our Domain Mapping plugin then you can do so as described on the following page.

    https://premium.wpmudev.org/project/domain-mapping/#product-usage

    Please advise if you have more questions.

    Best Regards,
    Vinod Dalvi

  • Ash
    • WordPress Hacker

    Hello @Bill

    I hope you are well today.

    Please note that, Multi Domains and Domain Mapping are totally different plugin. If you have any confusion, please let me know, I will explain.

    But for both, the A records need to be added in the domain management panel, not the hosting panel. Like, if you bought the additional domains from GoDaddy, then the A record has to be set in godaddy panel.

    One more thing, as you own all 19 domains, you can use same nameservers in all domains, instead of using IP. You just need to add those domain as parked domain in your VPS and point to the maid domain site (sample.com).

    Hope it helps :slight_smile: Please feel free to ask more question if you have any.

    Cheers
    Ash

  • Ash
    • WordPress Hacker

    Hello @Bill

    I hope you are well today.

    However all 20 websites are totally separate websites in terms of content, design and theme.

    20 websites are totally separate or they will be added as multi domain in same wordpress multisite? I am asking this because, your following comment and the above one made me confused:

    Alright.. so we have managed to get domains added via Multi domains.. Now we are on domains mapping page.

    Please suggest.

    I have just got response from our host that all 19 domains cant be added as parked domains because they already exists into VPS.

    What do you mean they already exist? If they exist then why you want to add as parked or addon domain?

    Cheers
    Ash

  • Bill
    • New Recruit

    Ok to clear your doubts, below is what i want to achieve

    1) I have 20 domains and like to host separate websites on each of them. These sites will be using their own theme and will have its own content. How do I achieve this?

    2) I have main site http://www.main.com with dedicated IP and other 19 sites on the same VPS with same IP.

    So far, I have added A record * IP ADDRESS into domain Cpanel.

    What next steps should I take?

  • Ash
    • WordPress Hacker

    Hello @Bill

    I hope you are well today.

    In that case, you don't need multi domain or domain mapping. Please note that, multi domain or domain mapping will be used only if you use a multisite.

    As you want separate site for separate domain, you need to create virtual host file. You have dedicated IP, that's fine. First, please add your IP address in DNS zone in each domain.

    Now in your VPS, create separate folders for each domain. Let me show you for two domains.

    Create two folders called:
    1. /var/www/domain-a.com/htdocs/ (for domain-a.com)
    2. /var/www/domain-b.com/htdocs/ (for domain-b.com)

    Create virtual hosts:

    <VirtualHost *:80>
        ServerAdmin admin@example.com
        ServerName domain-a.com
        ServerAlias http://www.domain-a.com
        DocumentRoot /var/www/domain-a.com/htdocs
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
    </VirtualHost>
    <VirtualHost *:80>
        ServerAdmin admin@example.com
        ServerName domain-b.com
        ServerAlias http://www.domain-b.com
        DocumentRoot /var/www/domain-b.com/htdocs
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
    </VirtualHost>

    Then restart your server.

    Here is a clean tutorial blog about this: https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts

    Please note that, this tutorial is based on Ubuntu OS. What is your OS?

    Cheers
    Ash

  • Ash
    • WordPress Hacker

    Hello @Bill

    Ok so if I use virtual hosts and run 20 websites. will i be able to manage them from your single plugin?

    E.g. change theme, add content etc?

    No, if the sites are separate, you can't manage them from a single plugin. In that case, you will need a multisite.

    In a multistie, you can have lots of subsites in one single wordpress installation. For example, you will make a wordpress site with a domain. Then convert that site into a multisite, create 19 subsites and you can map 19 domains with those subsites using our domain mapping plugin.

    Please follow these articles to know more about multisite:
    https://premium.wpmudev.org/manuals/wordpress-multisite/
    http://wpmu.org/wordpress-multisite-guide/
    https://premium.wpmudev.org/manuals/wpmu-manual-2/wordpress-wordpress-mu-and-wordpress-multisite/
    http://codex.wordpress.org/Create_A_Network
    http://mashable.com/2012/07/26/beginner-guide-wordpress-multisite/

    Hope it helps :slight_smile: Please feel free to ask more question if you have any.

    Cheers
    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.