SitePoint Sponsor

User Tag List

Results 1 to 13 of 13

Thread: IIS Custom Name

  1. #1
    SitePoint Enthusiast eneza's Avatar
    Join Date
    Feb 2009
    Location
    Philippines
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb IIS Custom Name

    Pardon me if I got into a wrong topic....

    THIS IS ALL ABOUT IIS

    I am accessing my localhost through my local IP
    how can I change it into something like this - http://localwebsite/ or http://localportal/
    not via IP

    I am in XP - running in port:8081 (I have apache installed run on port:80)

    Thanks in for the help

  2. #2
    Chopped Liver bronze trophy imaginekitty's Avatar
    Join Date
    Aug 2007
    Location
    Pennsyltucky
    Posts
    1,494
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    You could modify your hosts file
    C:\WINDOWS\system32\drivers\etc\hosts

    Change
    127.0.0.1 localhost
    to
    127.0.0.1 whatever

  3. #3
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,625
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Why not use the conventional http://localhost:8081 rather than standing up new host names? If you are on xp then you can't be running separate sites as IIS 5.1 is limited to a single site so it don't matter so much.

  4. #4
    SitePoint Enthusiast eneza's Avatar
    Join Date
    Feb 2009
    Location
    Philippines
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by wwb_99 View Post
    Why not use the conventional http://localhost:8081 rather than standing up new host names? If you are on xp then you can't be running separate sites as IIS 5.1 is limited to a single site so it don't matter so much.
    It really matters really, its about friendliness of the url they are visiting, if you are end user, localhost:8081 is alien to them it looks geeky, they like more of cuteurlforcommoner/login.aspx something like that.

  5. #5
    SitePoint Enthusiast eneza's Avatar
    Join Date
    Feb 2009
    Location
    Philippines
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by imaginekitty View Post
    You could modify your hosts file
    C:\WINDOWS\system32\drivers\etc\hosts

    Change
    127.0.0.1 localhost
    to
    127.0.0.1 whatever
    I tried that on IIS7 for multiple sites, I will surely try this for this case. Thanks!

  6. #6
    Chopped Liver bronze trophy imaginekitty's Avatar
    Join Date
    Aug 2007
    Location
    Pennsyltucky
    Posts
    1,494
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Oh, are you accepting incoming requests on the XP machine? I don't think the hosts file will help with that.

    I was thinking you just wanted a different name for testing apache vs IIS.

  7. #7
    Resident OCD goofball! bronze trophy Serenarules's Avatar
    Join Date
    Dec 2002
    Posts
    1,911
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)
    Assuming you have a DNS server somewhere pointing an url to your machine, all you have to do is add a header definition to the site in question. In IIS, right click the site you wish to edit, then click "Bindings". You will see a dialog with various names and associated ports. Click "Add" to include a new definition. This is how name-based hosting works, and how IIS knows which "site" it should serve, based on the incoming request.

  8. #8
    SitePoint Enthusiast eneza's Avatar
    Join Date
    Feb 2009
    Location
    Philippines
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by imaginekitty View Post
    Oh, are you accepting incoming requests on the XP machine? I don't think the hosts file will help with that.

    I was thinking you just wanted a different name for testing apache vs IIS.
    oh pardon me for the confusion, yes I am accepting request on the XP Machine.

  9. #9
    SitePoint Enthusiast eneza's Avatar
    Join Date
    Feb 2009
    Location
    Philippines
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Serenarules View Post
    Assuming you have a DNS server somewhere pointing an url to your machine, all you have to do is add a header definition to the site in question. In IIS, right click the site you wish to edit, then click "Bindings". You will see a dialog with various names and associated ports. Click "Add" to include a new definition. This is how name-based hosting works, and how IIS knows which "site" it should serve, based on the incoming request.
    This is in IIS 5/6 or 7 ? =)
    Thanks for the tip...

  10. #10
    Resident OCD goofball! bronze trophy Serenarules's Avatar
    Join Date
    Dec 2002
    Posts
    1,911
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)
    uh...all have a similar dialog, though the menu item names might not be the same. Just look through the contextual menus for a given site and look for Bindings.

    A few visuals should help: http://www.hosting.com/support/iis7/...sites-in-iis-7

  11. #11
    SitePoint Mentor NightStalker-DNS's Avatar
    Join Date
    Jul 2004
    Location
    Cape Town, South Africa
    Posts
    2,873
    Mentioned
    45 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by eneza View Post
    This is in IIS 5/6 or 7 ? =)
    Thanks for the tip...
    Yes, DNS would work for any web server. It is just a way of mapping a name to an IP address. And it is the only way to do it. You going to need a domain name for each site

  12. #12
    Chopped Liver bronze trophy imaginekitty's Avatar
    Join Date
    Aug 2007
    Location
    Pennsyltucky
    Posts
    1,494
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by NightStalker-DNS View Post
    Yes, DNS would work for any web server. It is just a way of mapping a name to an IP address. And it is the only way to do it. You going to need a domain name for each site
    Doesn't Windows only support one web site unless you are running a Server OS?

  13. #13
    SitePoint Mentor NightStalker-DNS's Avatar
    Join Date
    Jul 2004
    Location
    Cape Town, South Africa
    Posts
    2,873
    Mentioned
    45 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by imaginekitty View Post
    Doesn't Windows only support one web site unless you are running a Server OS?
    Yes, you are right. Sorry, have not used IIS6 or XP in ages. lol. OP is going to need windows server or windows 7


Bookmarks

Posting Permissions

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