Find the answer to your Linux question:
Results 1 to 8 of 8
First here is my under standing of virtual hosts is that you have one IP address and you can split that into multiple URL for example. IP: 192.168.3.4 URL: firsturl.com ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User
    Join Date
    Apr 2003
    Location
    TEXAS
    Posts
    314

    using virtual hosts


    First here is my under standing of virtual hosts is that you have one IP address and you can split that into multiple URL for example.

    IP: 192.168.3.4
    URL: firsturl.com
    URL: secondurl.com

    if you type in these urls you go to the same server but just to a different part of that server.

    Is this right also if this is right how can i set this up on my server.
    The computer made me do it!! Slackware and SUSE too Gig\'em WHOOOOP!!
    \"God put me on this earth to accomplish a certain amount of tasks, At the rate I\'m going I will never die.\" (I don\'t know)

  2. #2
    Linux User
    Join Date
    May 2003
    Location
    CA
    Posts
    370
    hi,

    this is called name-based hosting.
    just add the following sections to your httpd.conf file:

    <VirtualHost 192.168.3.4>
    ServerName www.firsturl.com
    DocumentRoot /www/firsturl
    </VirtualHost>

    <VirtualHost 192.168.3.4>
    ServerName www.secondurl.com
    DocumentRoot /www/secondurl
    </VirtualHost>

    Note that you can also use IP based virtual hosting which means that different web urls correspond to diff ip adresses.
    With name based hosting you will have to configure your DNS server to map each url name to the correct IP address.

  3. #3
    Linux User
    Join Date
    May 2003
    Location
    CA
    Posts
    370
    Also put the following line above the 2 paras mentioned below

    NameVirtualHost 192.168.3.4

  4. $spacer_open
    $spacer_close
  5. #4
    Linux User
    Join Date
    Apr 2003
    Location
    TEXAS
    Posts
    314
    thanx a bunch
    The computer made me do it!! Slackware and SUSE too Gig\'em WHOOOOP!!
    \"God put me on this earth to accomplish a certain amount of tasks, At the rate I\'m going I will never die.\" (I don\'t know)

  6. #5
    Linux User
    Join Date
    Apr 2003
    Location
    TEXAS
    Posts
    314
    Will this work with dyndns web hostin service
    The computer made me do it!! Slackware and SUSE too Gig\'em WHOOOOP!!
    \"God put me on this earth to accomplish a certain amount of tasks, At the rate I\'m going I will never die.\" (I don\'t know)

  7. #6
    Just Joined!
    Join Date
    Jun 2003
    Posts
    50
    bignester,
    I'm trying to do the same thing... so far no luck. It doesn't make sense... I am able to get to my server but just not to the name hosts assigned directories. It dosn't matter what I put in my name hosts documentroots, I always get the default error page.

  8. #7
    Linux Engineer
    Join Date
    Apr 2003
    Location
    Sweden
    Posts
    796
    The most common thing is that you have 1 dns-record to your page like..

    Real DocumentRoot
    http://www.utterberg.com
    ex:ipadress:192.168.0.1
    Docroot:www/html

    Then if you use viritual directory for apache you can it can look like this..

    Viritual 1
    http://www.utterberg.com/forum
    ex:ipadress:192.168.0.1
    Docroot:www/viritual/forum

    Viritual 2
    http://www.utterberg.com/otherstuff
    ex:ipadress:192.168.0.1
    Docroot:www/viritual/otherstuff


    If you use a dynamic dns software its possible to have completetly diffrent dns names also.

    Regards
    Regards

    Andutt

  9. #8
    Linux User
    Join Date
    May 2003
    Location
    CA
    Posts
    370
    I have a similar setup, I'll register with dyndns and let you know if it works for me or not.

Posting Permissions

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