Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 Multiple "localhost"s?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 26 February 2009 :  11:28:41  Show Profile  Reply with Quote
I'm trying to figure out how to set up additional local "domains" (don't know the proper name) on IIS5 and can't find anything in the help files.

I'm currently working on 4 different sites that each need to run from the root directory and it's becoming a right pain the in the proverbial having to go in to IIS and change the home directory of the default website every time I want to proof something.

Anyone know how I would go about setting it up so I could just have http://sitename/ point to a local directory for each site?

On a related note, because my websites need to run from the root directory, before uploading the proofs to a subdirectory on our server for our clients every evening, I have to go through each file for the site and change all the includes, links, CSS, etc. from pointing to the root directory to pointing to the subdirectory on our server. Any suggestions for working around this so I wouldn't have to make any changes? As you can imagine, it's quite a tedious & time consuming process, even more so when you're working on 4 sites simultaneously.

<

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”

Edited by - Shaggy on 27 February 2009 07:48:55

SiSL
Average Member

Turkey
671 Posts

Posted - 26 February 2009 :  14:13:53  Show Profile  Visit SiSL's Homepage  Reply with Quote
Simple, go to C:\Windows\system32\drivers\etc folder and edit "hosts" file...

Such as adding lines:
127.0.0.1 myfakedomain.com
127.0.0.1 fakedomain.com

Then from IIS options, just add "host headers" of myfakedomain.com or fakedomain.com and you'll be able to see them as http://myfakedomain.com from local...
<

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 26 February 2009 :  14:26:51  Show Profile  Visit HuwR's Homepage  Reply with Quote
or just assign a different portnumber for each website and then
use
http://localhost:8080
http://localhost:8081

etc.<
Go to Top of Page

Classicmotorcycling
Development Team Leader

Australia
2084 Posts

Posted - 27 February 2009 :  02:11:53  Show Profile  Reply with Quote
Or you can use "host headers" which has been around from IIS4 and is quite easy to use. It allows you to use the 1 local host IP (or any other IP Address) with multiple sites and the host file is the easiest way to point the extra sites to your host header like so:

127.0.0.1 myfakedomain.com fakedomain.com anotherfakedomain.com morefakedomain.com

I can do a quick doc to show you how to use host headers if you want.
<

Cheers,

David Greening
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 27 February 2009 :  04:40:53  Show Profile  Reply with Quote
Thanks for the suggestions, guys. Think the host headers might be the way to go for me, saves me trying to remember which port is for which site.

I already know how to edit the hosts file as SiSL posted above (our ISP in work is obscenely slow at updating their DNS) so I' just need to know how to set the home directory for each of my new fake domains. Note that in IIS, all I have available is the default web site and the context menu for the "Web sites" node doesn't have the option to create a new site (IIS 5.1 running on XP SP3).

<

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 27 February 2009 :  07:07:18  Show Profile  Visit HuwR's Homepage  Reply with Quote
ah, you should have mentioned you had XP

you are buggered since you can't create more than one website<
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 27 February 2009 :  07:43:28  Show Profile  Visit SiSL's Homepage  Reply with Quote
yeah, you are stucked with one site in XP :)

Alright, here is your solution:

http://www.helicontech.com/isapi_rewrite/

Basic idea is to forward incoming different type of hosts to different folders in your site...
<

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod

Edited by - SiSL on 27 February 2009 07:46:26
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 27 February 2009 :  07:51:57  Show Profile  Reply with Quote
quote:
Originally posted by HuwR
ah, you should have mentioned you had XP

you are buggered since you can't create more than one website
Ah, knackers! Bit of a silly restriction, that.

SiSL, can't see the boss throwing a hundred bucks at some software to solve what is, essentially, just a minor inconvenience. Would the light (spell it properly, ****it!) version do the job for me, maybe?

<

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 27 February 2009 :  08:08:49  Show Profile  Visit HuwR's Homepage  Reply with Quote
check this out Shaggy

http://www.codeproject.com/KB/cs/iisadminnet.aspx<
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 27 February 2009 :  08:19:06  Show Profile  Reply with Quote
Thanks, Huw; looks like that's exactly what I need Can't get on to my server at the moment to create and e-mail address to register with so I'll have to wait 'til Monday to try it out.

<

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”

Edited by - Shaggy on 27 February 2009 08:19:22
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 27 February 2009 :  08:22:48  Show Profile  Visit HuwR's Homepage  Reply with Quote
you can download it from here http://www.codeplex.com/iisadmin as well<
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 27 February 2009 :  08:56:44  Show Profile  Reply with Quote
Cheers, buddy. Will give it a whirl this evening.

<

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 27 February 2009 :  10:23:20  Show Profile  Visit SiSL's Homepage  Reply with Quote
quote:
Originally posted by Shaggy

quote:
Originally posted by HuwR
ah, you should have mentioned you had XP

you are buggered since you can't create more than one website
Ah, knackers! Bit of a silly restriction, that.

SiSL, can't see the boss throwing a hundred bucks at some software to solve what is, essentially, just a minor inconvenience. Would the light (spell it properly, ****it!) version do the job for me, maybe?





Actually there is a freeware version that works on enviroments of a single web site lik XP...

http://www.helicontech.com/download-isapi_rewrite3.htm
<

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod

Edited by - SiSL on 27 February 2009 10:24:55
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.17 seconds. Powered By: Snitz Forums 2000 Version 3.4.07