1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

host headers / multiple web sites

Discussion in 'Software Development' started by dragonlight, Jan 3, 2003.

Thread Status:
Not open for further replies.
Advertisement
  1. dragonlight

    dragonlight Thread Starter

    Joined:
    May 30, 2002
    Messages:
    347
    i am trying to host 2- 3 web sites with one ip address, on a single server. I have been told this is possible. I have gone into internet service manager and created another web site. (as told to do in a microsoft document) the default web site works great, but when I go and type in the address for the second web site, it takes me to my default web site. I told the 2nd web site where to find the files for it's web pages, but it is just going to the default web site. would greatly appreciate some help.

    PLEASE HELP :D
     
  2. grahowler

    grahowler

    Joined:
    Dec 14, 2002
    Messages:
    21
    If you are using Win2k open up "internet service manager ", right click the new site you have created and click properties. Find the "host header" (or something of the like) tab and add a name for the new site (e.g. newSite1).

    Then you need to locate your "hosts" file, somewhere like: C:\WINNT\system32\drivers\etc\hosts (note that this file has no file extension, you can just do a file search for it but don't confuse it for another file called "LMHOSTS").

    Open the hosts file in notepad, it is fairly self explanatory, but you basically need to add the following line...

    127.0.0.1 newSite1

    and save the file.This will map the name host header name you created to your server, all you need to do is type "newSite1" in your browser and you should be away.

    Cheers

    grahowler
     
  3. dragonlight

    dragonlight Thread Starter

    Joined:
    May 30, 2002
    Messages:
    347
    ok, did what you said, I put the new web site name after I typed in 127.0.0.1, the new site name, so in that file I placed

    127.0.0.1 www.cavlink.com, when I put that in, it still takes me to my old web site... or the original site that is being hosted on the server..... but if I type this in on the server, then it takes me to the cavlink site, like it is suppose to....

    I also tried my ip address 24.220.55.200 www.cavlink.com
    that did the same thing I typed about above, is there still something I am doing wrong?

    :(
     
  4. Rockn

    Rockn

    Joined:
    Jul 29, 2001
    Messages:
    21,334
    Are you trying to redirect browsers to the other web site? I have never heard of running multiple web sites from one IP in the first place. What you are attempting to do will always take you to the default web site. You could try other ports for each web site and I think that will be the only way it's going to work.
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/111122

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice