#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    5
    Rep Power
    0

    2 web sites but only one works


    I have 2 intranets sitting on my Windows 2000 server at work.

    For this example, lets call them website1 and website2.

    In my hosts file in winnt/system32/drivers/etc I have added the following 2 entries

    10.0.0.225 website1

    10.0.0.225/website2 website2

    In have set the 2 web sites up in IIS and they work fine if I type the ip address and the name (i.e. http://10.0.0.225/website2)

    However, when I type http://website1 it appears correctly.

    When I type http://website2 is gives me "page cannot be displayed" errors.

    Anyone know what im doing wrong?
  2. #2
  3. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,453
    Rep Power
    4539
    I don't think you can do what you did in the hosts file for website 2

    DNS doesn't consider subdirectories

    Probably if you go to http://website1/website2 it will work. I would normally just create two different virtual directories for the websites, and one DNS/hosts entry
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    5
    Rep Power
    0

    Thanks but....


    I want my server to be able to deliver my 2 websites to the desktop by just typing in 1 of 2 words.
    My 2 websites are called Mantis and Megabytes.

    Megabytes has been working fine for ages. It has a virtual directory under the Default WEb Site in IIS and has its own web site on IIS just to make sure I did it correctly.

    However now I want to add Mantis to it too.

    What I beleive you are telling me to do is make mantis a subdirectory of megabytes?

    i.e. http://megabytes/mantis

    Unfortunately, I cannot do this as my users wont understand it!
    They need to just be able to type Mantis

    Anyway, I have changed my HOSTS file on the server to read like this:
    10.0.0.225 megabytes
    10.0.0.225 mantis

    WhenI open a browser on the server and I type mantis , it works! however, when I go to a client machine, it still comes back with page cannot be displayed!

    Any ideas what I need to do to get my clients to be able to hit the site?
    I have created both a virtual directory and a web site for Mantis, just like Megabytes.
  6. #4
  7. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,453
    Rep Power
    4539
    The hosts file on the server will not help clients resolve mantis to the correct IP. You will need to make that change in the client hosts file.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester

IMN logo majestic logo threadwatch logo seochat tools logo