Find the answer to your Linux question:
Results 1 to 5 of 5
Hi all New to web hosting here...Couple questions 1. What is the general school of thought on hosting different sites in the same box, versus putting them each on their ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2011
    Posts
    59

    Host multiple sites on same box?


    Hi all

    New to web hosting here...Couple questions

    1. What is the general school of thought on hosting different sites in the same box, versus putting them each on their own boxes (virtual or physical). Should we be putting each site on it's own vm? Or is it ok to combine two irrelevent sites on the same box?

    2. Let's say I have a domain Company.com that links to my static IP. Now I have two subdomains for my company, but they are unreleated. For example: voip.company.com is my voip/phone server, and billing.company.com is my billing system. If I wanted to host these on the same box, how can I direct each to their own website? I'm assuming each would be a sub-directory in the /var/www folder (e.g. /var/www/voip and /var/www/billing). How to do this? Htaccess? OR should I be putting these on their own box or virtual machine?

    Thanks!

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    You could host them all on the same box. Just setup virtual sites.

    Apache Virtual Host documentation

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #3
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,569
    Have a look at this tutorial which gives a different view on setting such a thing up. It focuses on a development box but the same principles apply.
    What do we want?
    Time machines!

    When do we want 'em?
    Doesn't really matter does it!?


    The Fifth Continent

  4. #4
    Linux User stokes's Avatar
    Join Date
    Oct 2004
    Location
    UK
    Posts
    274
    Yep, you can host multiple sites on one box with one IP address using host headers (name based virtual hosting).

    If you have sites that are SSL enabled then you will need a separate IP for each SSL virtualhost if you want them to all use port 443 for https - just something to be aware of.
    Registered Linux user #389109
    My Semi-Linux Blog

  5. #5
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,578
    While you can run multiple sites from one box, it would generally be recommended to host each in its own virtual machine in such a case. It makes each more manageable, and secure. Each VM can have it's own IP address, data storage (physical or virtual), and access policies. In truth, it is applying the KISS principle, not to mention the separation of domains one as well.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •