Hosting two sites from one domain?

Discussion in 'Server Operation' started by badgerbox76, Apr 10, 2008.

  1. badgerbox76

    badgerbox76 New Member

    So I have one site hosted and I want another hosted on the same domain.

    So how can I set this up

    My Main Site

    My Development Site

  2. rainydayz

    rainydayz New Member

    The configuration varies slightly from distro to distro and depending upon the version of apache you're running. You want to check the documentation for virtualhosts.
  3. zcworld

    zcworld New Member

    this is what i use for my vhost site
    just copy and paste and update the info for your needs
    and make sure you got the htdocs / log folder made as well

    open your ur httpd.conf file
    and add to the bottom of it
    NameVirtualHost *
    include /var/www/conf.d/*.conf

    save it

    mkdir -p /var/www/conf.d
    cd /var/www/conf.d/


    <VirtualHost *>
    DocumentRoot /var/www/vhosts/
    <Directory />
    Options FollowSymLinks
    AllowOverride None
    <Directory /var/www/vhosts/>
    Options Indexes FollowSymLinks MultiViews

    CustomLog /var/www/vhosts/ combined
    ErrorLog /var/www/vhosts/

    save the file

    mkdir -p /var/www/vhosts/
    mkdir -p /var/www/vhosts/

    repeart as many time as you need (update the info on the fly as you need )
    than restart apache

    make sure you set in your hosts file
    IP <TAB>

    if you dont have your own DNS server

Share This Page