Find the answer to your Linux question:
Results 1 to 5 of 5
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    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 that links to my static IP. Now I have two subdomains for my company, but they are unreleated. For example: is my voip/phone server, and 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?


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

    Apache Virtual Host documentation


    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #3
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Either at home or at work or down the pub
    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.
    Should you be sitting wondering,
    Which Batman is the best,
    There's only one true answer my friend,
    It's Adam Bloody West!

    The Fifth Continent

  4. $spacer_open
  5. #4
    Linux User stokes's Avatar
    Join Date
    Oct 2004
    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

  6. #5
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    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