Creating host headers in IIS6

Creating host headers in IIS6

am 07.08.2007 22:32:52 von obrienjf

Hey all...I installed an application that installed its website under
the Default Web Site in IIS 6. There is already a website installed
under this directory. I want to create a host header to make the URL
more user friendly, however, it does not appear that I can do this.
All the information I go to online tells me to go to the Properties of
the web site I want to create the host header on and then hit Advanced
to enter the IP/Port/Host Header name. However, when I do this, since
it's installed under the Default Web Site, I can't assign it a
different IP, port, or host header name. The option does not exist.
The options do exist, though, when I go to the Properties of the
Default Web Site, which doesn't do me any good since multiple sites
are installed under it. Does anyone have any ideas? Thanks!

Re: Creating host headers in IIS6

am 08.08.2007 03:19:48 von David Wang

On Aug 7, 1:32 pm, "obrie...@gmail.com" wrote:
> Hey all...I installed an application that installed its website under
> the Default Web Site in IIS 6. There is already a website installed
> under this directory. I want to create a host header to make the URL
> more user friendly, however, it does not appear that I can do this.
> All the information I go to online tells me to go to the Properties of
> the web site I want to create the host header on and then hit Advanced
> to enter the IP/Port/Host Header name. However, when I do this, since
> it's installed under the Default Web Site, I can't assign it a
> different IP, port, or host header name. The option does not exist.
> The options do exist, though, when I go to the Properties of the
> Default Web Site, which doesn't do me any good since multiple sites
> are installed under it. Does anyone have any ideas? Thanks!


You need to create a new website, setup its bindings, and point its
content directory at your application.

That is what you do when you want to use a friendly host header.

What you were doing was installing your application as a virtual
directory underneath the Default Web Site, which means you cannot
customize the IP:Port:Hostname for just the virtual directory. How you
do that is to promote the Virtual Directory to be a Website and then
customize the website's IP:Port:Hostname.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//

Re: Creating host headers in IIS6

am 08.08.2007 03:37:25 von obrienjf

On Aug 7, 9:19 pm, David Wang wrote:
> On Aug 7, 1:32 pm, "obrie...@gmail.com" wrote:
>
> > Hey all...I installed an application that installed its website under
> > the Default Web Site in IIS 6. There is already a website installed
> > under this directory. I want to create a host header to make the URL
> > more user friendly, however, it does not appear that I can do this.
> > All the information I go to online tells me to go to the Properties of
> > the web site I want to create the host header on and then hit Advanced
> > to enter the IP/Port/Host Header name. However, when I do this, since
> > it's installed under the Default Web Site, I can't assign it a
> > different IP, port, or host header name. The option does not exist.
> > The options do exist, though, when I go to the Properties of the
> > Default Web Site, which doesn't do me any good since multiple sites
> > are installed under it. Does anyone have any ideas? Thanks!
>
> You need to create a new website, setup its bindings, and point its
> content directory at your application.
>
> That is what you do when you want to use a friendly host header.
>
> What you were doing was installing your application as a virtual
> directory underneath the Default Web Site, which means you cannot
> customize the IP:Port:Hostname for just the virtual directory. How you
> do that is to promote the Virtual Directory to be a Website and then
> customize the website's IP:Port:Hostname.
>
> //Davidhttp://w3-4u.blogspot.comhttp://blogs.msdn.com/David. Wang
> //

Thanks! So I don't need to reinstall the application right? I am not
sure how to "promote" it to a Website...is this just creating a new
website and pointing the website location to the current location of
the virtual site? Thanks!

Re: Creating host headers in IIS6

am 08.08.2007 03:44:46 von David Wang

On Aug 7, 6:37 pm, "obrie...@gmail.com" wrote:
> On Aug 7, 9:19 pm, David Wang wrote:
>
>
>
>
>
> > On Aug 7, 1:32 pm, "obrie...@gmail.com" wrote:
>
> > > Hey all...I installed an application that installed its website under
> > > the Default Web Site in IIS 6. There is already a website installed
> > > under this directory. I want to create a host header to make the URL
> > > more user friendly, however, it does not appear that I can do this.
> > > All the information I go to online tells me to go to the Properties of
> > > the web site I want to create the host header on and then hit Advanced
> > > to enter the IP/Port/Host Header name. However, when I do this, since
> > > it's installed under the Default Web Site, I can't assign it a
> > > different IP, port, or host header name. The option does not exist.
> > > The options do exist, though, when I go to the Properties of the
> > > Default Web Site, which doesn't do me any good since multiple sites
> > > are installed under it. Does anyone have any ideas? Thanks!
>
> > You need to create a new website, setup its bindings, and point its
> > content directory at your application.
>
> > That is what you do when you want to use a friendly host header.
>
> > What you were doing was installing your application as a virtual
> > directory underneath the Default Web Site, which means you cannot
> > customize the IP:Port:Hostname for just the virtual directory. How you
> > do that is to promote the Virtual Directory to be a Website and then
> > customize the website's IP:Port:Hostname.
>
> > //Davidhttp://w3-4u.blogspot.comhttp://blogs.msdn.com/David. Wang
> > //
>
> Thanks! So I don't need to reinstall the application right? I am not
> sure how to "promote" it to a Website...is this just creating a new
> website and pointing the website location to the current location of
> the virtual site? Thanks!- Hide quoted text -
>
> - Show quoted text -


Yes.

You are always free to remap things in the Virtual URL namespace.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//

Re: Creating host headers in IIS6

am 08.08.2007 16:11:06 von obrienjf

On Aug 7, 9:44 pm, David Wang wrote:
> On Aug 7, 6:37 pm, "obrie...@gmail.com" wrote:
>
>
>
>
>
> > On Aug 7, 9:19 pm, David Wang wrote:
>
> > > On Aug 7, 1:32 pm, "obrie...@gmail.com" wrote:
>
> > > > Hey all...I installed an application that installed its website under
> > > > the Default Web Site in IIS 6. There is already a website installed
> > > > under this directory. I want to create a host header to make the URL
> > > > more user friendly, however, it does not appear that I can do this.
> > > > All the information I go to online tells me to go to the Properties of
> > > > the web site I want to create the host header on and then hit Advanced
> > > > to enter the IP/Port/Host Header name. However, when I do this, since
> > > > it's installed under the Default Web Site, I can't assign it a
> > > > different IP, port, or host header name. The option does not exist.
> > > > The options do exist, though, when I go to the Properties of the
> > > > Default Web Site, which doesn't do me any good since multiple sites
> > > > are installed under it. Does anyone have any ideas? Thanks!
>
> > > You need to create a new website, setup its bindings, and point its
> > > content directory at your application.
>
> > > That is what you do when you want to use a friendly host header.
>
> > > What you were doing was installing your application as a virtual
> > > directory underneath the Default Web Site, which means you cannot
> > > customize the IP:Port:Hostname for just the virtual directory. How you
> > > do that is to promote the Virtual Directory to be a Website and then
> > > customize the website's IP:Port:Hostname.
>
> > > //Davidhttp://w3-4u.blogspot.comhttp://blogs.msdn.com/David. Wang
> > > //
>
> > Thanks! So I don't need to reinstall the application right? I am not
> > sure how to "promote" it to a Website...is this just creating a new
> > website and pointing the website location to the current location of
> > the virtual site? Thanks!- Hide quoted text -
>
> > - Show quoted text -
>
> Yes.
>
> You are always free to remap things in the Virtual URL namespace.
>
> //Davidhttp://w3-4u.blogspot.comhttp://blogs.msdn.com/David. Wang
> //- Hide quoted text -
>
> - Show quoted text -

Dave,

Thanks...I appreciate your input. I am not too IIS savvy, but I will
see what I can do based on your advice.

RE: Creating host headers in IIS6

am 09.08.2007 15:16:04 von chris blaeser

How do you promote the Virtual Directory to be a Website if it is a virtual directory underneath the default web site (with out recreating it..?) I want to assign a 'friendly' name to the web site and do not want the client to type in the 27 char FQDN or the web site name it self, will get an A-record set to point to an IP address but can't assign a unique IP address to a virtual Directory ...?

thanks

From http://www.developmentnow.com/g/59_2007_8_0_0_1003611/Creati ng-host-headers-in-IIS6.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com

Re: Creating host headers in IIS6

am 09.08.2007 22:01:51 von David Wang

You do this by creating a completely new website which binds to the IP
and Hostname that you want for the website, and configure its Home
Directory path to the application. The virtual directory you created
can be deleted.

Think about it this way:
- IIS Website is how you map an IP:Port:Host (i.e.
1.2.3.4:80:sub.domain.com) to an application at "/". This application
is a virtual directory, described next
- IIS Virtual Directory is how you map a relative URL on the server
(i.e. /foo) to a physical directory (i.e. C:\inetpub\wwwroot
\MyWebApplication).

You tried to create a Virtual Directory and then map IP:Port:Host to
it, which is not what it is for. You need to create a Website to map
IP:Port:Host to it, and then map that website's root application at
"/" to your web application's physical path. This makes that web
application appear to have the friendly hostname -- which is what you
want to achieve, correct?

There are lots of terminology out there related to IIS, like "Virtual
Sites", "Virtual Servers" (not to be confused with the Virtual Server
product from Microsoft which actually runs Virtual Machines...), "Web
Applications", etc -- they are all just different names for the exact
same underly technology utilized in slightly different ways.

In IIS's terminology for technology used by everything else, there are
only:
- things that map IP:Port:Host to the root of a URL namespace
- things that map URL namespace to Filesystem namespace

The thing that maps IP:Port:Host is called Website, and the thing that
maps URLs to to FileSystem namespace is called Virtual Directory or
Web Application, sorta synonymous due to how people use it.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//




On Aug 9, 6:16 am, chris blaeser wrote:
> How do you promote the Virtual Directory to be a Website if it is a virtual directory underneath the default web site (with out recreating it..?) I want to assign a 'friendly' name to the web site and do not want the client to type in the 27 char FQDN or the web site name it self, will get an A-record set to point to an IP address but can't assign a unique IP address to a virtual Directory ...?
>
> thanks
>
> Fromhttp://www.developmentnow.com/g/59_2007_8_0_0_1003611/Cr eating-host-h...
>
> Posted via DevelopmentNow.com Groupshttp://www.developmentnow.com