Apache- Multiple Website/Virutal Host

Discussion in 'Apache' started by lipton112, Feb 12, 2007.

  1. #1
    (Note- This is running on a windows platform)
    Okay wait, let me start over. I think I have made some progress so far from before.



    So far, from the box I want tot host these sites on will only have (1) IP. So, in that case I am going to use the following code in my httpd.conf file for Apache. PLEASE TELL ME IF THIS IS CORRECT. (Note- leagedns.com is the main site, but I want to add another subdomain named option-gaming.leaguedns.com).



    NameVirtualHost *:80

    #<VirtualHost *:80>
    # ServerAdmin webmaster@dummy-host.example.com
    # DocumentRoot /www/docs/dummy-host.example.com
    # ServerName dummy-host.example.com
    # ErrorLog logs/dummy-host.example.com-error_log
    # CustomLog logs/dummy-host.example.com-access_log common
    #</VirtualHost>

    #<VirtualHost *:80>
    # ServerAdmin admin@leagueservers.com
    # DocumentRoot “C:/Documents and Settings/lipton/Desktop/ApacheServerFiles/sub1”
    # ServerName option-gaming.leaguedns.com
    # ErrorLog logs/mysite.error_log
    # CustomLog logs/mysite.access_log common
    #</VirtualHost>




    *******All the files for the sub-domain I want to be in a folder called sub1.



    Also corosponding with this will be anther config file placed in your windows/system32 folder named HOSTS. In this file, it tells me:
    # Copyright (c) 1993-1999 Microsoft Corp.
    #
    # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
    #
    # This file contains the mappings of IP addresses to host names. Each
    # entry should be kept on an individual line. The IP address should
    # be placed in the first column followed by the corresponding host name.
    # The IP address and the host name should be separated by at least one
    # space.
    #
    # Additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a '#' symbol.
    #
    # For example:
    #
    # 102.54.94.97 rhino.acme.com # source server
    # 38.25.63.10 x.acme.com # x client host

    127.0.0.1 localhost
    24.10.245.23 option-gaming.leaguedns.com







    *********Is that right?
     
    lipton112, Feb 12, 2007 IP
  2. grk519

    grk519 Peon

    Messages:
    293
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Yeah it all looks fine and dandy to me. Have you implemented and tried this yet?
     
    grk519, Feb 19, 2007 IP