IIS Server - Help please!!!

This is Interesting: Free IT Magazines  
Home > Archive > IIS Server > August 2005 > Help please!!!





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Help please!!!
Newbie

2005-08-24, 6:10 pm

Hi, Gurus:

I am running Windows 2003 Server and IIS 6.0. I have a static IP which
points to a default website on the server. Before I could access the server
remotely and could access the website by using the IP address, for example:
http://23.23.23.23/mywebsite

but once I used the Host Header Names to configure the web site, like this:
IP Address TCP Port Host Header Name

23.23.23.23 80 www.example1.com
23.23.23.23 80 example1.com
Nothing is working, I can not use the IP address to access the server
remotely or I can not use the hostname.

What is wrong, can anyone help me out?

Another question, I don't want to show my IP address in the IE Address area,
how to do this?

Thanks
Jim

2005-08-24, 6:10 pm

well, do you have a dns or host file entry that resolves your host header
name to the IP?

"Newbie" wrote:

> Hi, Gurus:
>
> I am running Windows 2003 Server and IIS 6.0. I have a static IP which
> points to a default website on the server. Before I could access the server
> remotely and could access the website by using the IP address, for example:
> http://23.23.23.23/mywebsite
>
> but once I used the Host Header Names to configure the web site, like this:
> IP Address TCP Port Host Header Name
>
> 23.23.23.23 80 www.example1.com
> 23.23.23.23 80 example1.com
> Nothing is working, I can not use the IP address to access the server
> remotely or I can not use the hostname.
>
> What is wrong, can anyone help me out?
>
> Another question, I don't want to show my IP address in the IE Address area,
> how to do this?
>
> Thanks

Newbie

2005-08-24, 6:10 pm

Yes, I have registered my Host Header with my DNS server.
Is there anything to do with the SSL?

"Jim" wrote:
[vbcol=seagreen]
> well, do you have a dns or host file entry that resolves your host header
> name to the IP?
>
> "Newbie" wrote:
>
Jim

2005-08-24, 6:10 pm

well SSL is for https not http. are you wanting SSL encryption?

Have you verified the DNS entry is working. for instance pinging
www.example1.com to see if it truely resolves to 23.23.23.23?

"Newbie" wrote:
[vbcol=seagreen]
> Yes, I have registered my Host Header with my DNS server.
> Is there anything to do with the SSL?
>
> "Jim" wrote:
>
Kristofer Gafvert [MVP]

2005-08-24, 6:10 pm

Based on the configuration you have given, you should not be able to
access the website using the IP. Because when you use the IP, the
webbrowser either sends the IP as host header, or does not send any host
header at all. But your configuration requires a host header name of
either www.example1.com or example1.com.

So we need to figure out the answer to your second question, why it does
not work when you use the host name.

The first thing you need to do is to verify that the host name resolves to
your IP. Use nslookup to do this.

nslookup www.example1.com

Does this give back the IP of your webserver? If not, then that is the
problem and you need to configure the DNS server. If it does give back the
correct IP, then we need to know what you actually see when you try to
access the website. What is the error message (please disable "Show
friendly HTTP error messages" in Internet Explorer)?

Please also look in the IIS log file
(C:\Windows\System32\logfiles\w3svcNNN where NNN is the website ID) what
the status and substatus of the request is (if the request is recorded, if
not, the request never gets to IIS and you have another problem).


--
Regards,
Kristofer Gafvert (IIS MVP)
http://www.gafvert.info/iis/ - IIS Related Info


Newbie wrote:

>Hi, Gurus:
>
>I am running Windows 2003 Server and IIS 6.0. I have a static IP which
>points to a default website on the server. Before I could access the server
>remotely and could access the website by using the IP address, for example:
>http://23.23.23.23/mywebsite
>
>but once I used the Host Header Names to configure the web site, like this:
> IP Address TCP Port Host Header Name
>
> 23.23.23.23 80 www.example1.com
> 23.23.23.23 80 example1.com
>Nothing is working, I can not use the IP address to access the server
>remotely or I can not use the hostname.
>
>What is wrong, can anyone help me out?
>
>Another question, I don't want to show my IP address in the IE Address
>area,
>how to do this?
>
>Thanks

Newbie

2005-08-24, 6:10 pm

Hi, Kristofer:

Thanks for your reply.

I checked nslookup www.example1.com, it gave me back the IP if my ISP. I
registered my domain with my ISP. But when I type in http://www.example1.com/
in IE, IE displays my server's IP like: http://23.23.23.23/ in the Address
bar and the Title, with a message "Bad Request (Invalid Hostname)"

Also when I ping www.example1.com, it returns the IP of my ISP, not
mine:23.23.23.23

Any help please?


"Kristofer Gafvert [MVP]" wrote:

> Based on the configuration you have given, you should not be able to
> access the website using the IP. Because when you use the IP, the
> webbrowser either sends the IP as host header, or does not send any host
> header at all. But your configuration requires a host header name of
> either www.example1.com or example1.com.
>
> So we need to figure out the answer to your second question, why it does
> not work when you use the host name.
>
> The first thing you need to do is to verify that the host name resolves to
> your IP. Use nslookup to do this.
>
> nslookup www.example1.com
>
> Does this give back the IP of your webserver? If not, then that is the
> problem and you need to configure the DNS server. If it does give back the
> correct IP, then we need to know what you actually see when you try to
> access the website. What is the error message (please disable "Show
> friendly HTTP error messages" in Internet Explorer)?
>
> Please also look in the IIS log file
> (C:\Windows\System32\logfiles\w3svcNNN where NNN is the website ID) what
> the status and substatus of the request is (if the request is recorded, if
> not, the request never gets to IIS and you have another problem).
>
>
> --
> Regards,
> Kristofer Gafvert (IIS MVP)
> http://www.gafvert.info/iis/ - IIS Related Info
>
>
> Newbie wrote:
>
>

Kristofer Gafvert [MVP]

2005-08-24, 6:10 pm

So if you use nslookup, you get back some other IP, and not the IP of the
webserver? I do not understand which IP "IP if my ISP" mean (because your
ISP most likely has an IP range, and your webserver is given one of those
IPs, so "IP of my ISP" is ambigious).

But if nslookup does not give you the IP of the webserver, then the
problem is DNS related.

Anyway, it could be that your ISP is using some kind of port forwarding.
Consider this scenario, which may be true in your case:

You type www.example1.com in your browser. Your browser looks up this
domain to get an IP, and connects to this IP. This IP is assigned to a
machine hosted by your ISP. This machine forwards the request to your
webserver, but do NOT send any host header. When the request gets to your
webserver, it is missing the host header, and your webserver responds with
a "Bad Request (Invalid Hostname)".

I think you need to discuss this with your ISP.

You can verify that host headers are working on the webserver by using
either telnet, or WFetch (from the IIS 6.0 Resource Kit Tools). To verify
this using WFetch do this:

Start WFetch.
In the Host text box, type 23.23.23.23
In the Path text box, typ /
Under "Advanced Request" change to "Add headers"
Type: Host: www.example1.com\r\n

Click the Go button.

Now you should get the page of your website.

--
Regards,
Kristofer Gafvert (IIS MVP)
http://www.gafvert.info/iis/ - IIS Related Info


Newbie wrote:
[vbcol=seagreen]
>Hi, Kristofer:
>
>Thanks for your reply.
>
>I checked nslookup www.example1.com, it gave me back the IP if my ISP. I
>registered my domain with my ISP. But when I type in
>http://www.example1.com/
> in IE, IE displays my server's IP like: http://23.23.23.23/ in the Address
>bar and the Title, with a message "Bad Request (Invalid Hostname)"
>
>Also when I ping www.example1.com, it returns the IP of my ISP, not
>mine:23.23.23.23
>
>Any help please?
>
>
>"Kristofer Gafvert [MVP]" wrote:
>
Newbie

2005-08-24, 6:10 pm

Yes, Christofer:

My ISP is www.oneandone.co.uk, when I ping www.example1.com or nslookup
www.example1.com, it returns the IP of oneandone (212.227.124.86), not mine.
Hope this is clear to you. And my ISP is using some kind of port forwarding.

"Kristofer Gafvert [MVP]" wrote:

> So if you use nslookup, you get back some other IP, and not the IP of the
> webserver? I do not understand which IP "IP if my ISP" mean (because your
> ISP most likely has an IP range, and your webserver is given one of those
> IPs, so "IP of my ISP" is ambigious).
>
> But if nslookup does not give you the IP of the webserver, then the
> problem is DNS related.
>
> Anyway, it could be that your ISP is using some kind of port forwarding.
> Consider this scenario, which may be true in your case:
>
> You type www.example1.com in your browser. Your browser looks up this
> domain to get an IP, and connects to this IP. This IP is assigned to a
> machine hosted by your ISP. This machine forwards the request to your
> webserver, but do NOT send any host header. When the request gets to your
> webserver, it is missing the host header, and your webserver responds with
> a "Bad Request (Invalid Hostname)".
>
> I think you need to discuss this with your ISP.
>
> You can verify that host headers are working on the webserver by using
> either telnet, or WFetch (from the IIS 6.0 Resource Kit Tools). To verify
> this using WFetch do this:
>
> Start WFetch.
> In the Host text box, type 23.23.23.23
> In the Path text box, typ /
> Under "Advanced Request" change to "Add headers"
> Type: Host: www.example1.com\r\n
>
> Click the Go button.
>
> Now you should get the page of your website.
>
> --
> Regards,
> Kristofer Gafvert (IIS MVP)
> http://www.gafvert.info/iis/ - IIS Related Info
>
>
> Newbie wrote:
>
>

Kristofer Gafvert [MVP]

2005-08-24, 6:10 pm

Okay, that explains what you see. You will need to contact your ISP to
find a solution to this, because IIS does not seem to get any host header
when this forwarding is involved (assuming that your ISP has properly
configured the DNS server and that it should point to the IP of their
server, and not yours).

There does not seem to be anything wrong with IIS at this point.

--
Regards,
Kristofer Gafvert (IIS MVP)
http://www.gafvert.info/iis/ - IIS Related Info


Newbie wrote:
[vbcol=seagreen]
>Yes, Christofer:
>
>My ISP is www.oneandone.co.uk, when I ping www.example1.com or nslookup
>www.example1.com, it returns the IP of oneandone (212.227.124.86), not
>mine.
>Hope this is clear to you. And my ISP is using some kind of port
>forwarding.
>
>"Kristofer Gafvert [MVP]" wrote:
>
Newbie

2005-08-24, 6:10 pm

Kristofer:

Thank you very very much! I will contact my ISP.

"Kristofer Gafvert [MVP]" wrote:

> Okay, that explains what you see. You will need to contact your ISP to
> find a solution to this, because IIS does not seem to get any host header
> when this forwarding is involved (assuming that your ISP has properly
> configured the DNS server and that it should point to the IP of their
> server, and not yours).
>
> There does not seem to be anything wrong with IIS at this point.
>
> --
> Regards,
> Kristofer Gafvert (IIS MVP)
> http://www.gafvert.info/iis/ - IIS Related Info
>
>
> Newbie wrote:
>
>

Newbie

2005-08-25, 6:04 pm

Hi, Kristofer:

I developed two websites, website1 and website2, I can access them using the
IP address like this: https://23.23.23.23/website1/ or
https://23.23.23.23/website2/

I registered a domain with my ISP, for example: www.mycompanyA.com to point
to https://23.23.23.23/website1/, so when you type
http://www.mycompanyA.com/ in the brower, website1 will be displayed. That is
fine. But in the Address bar of the
brower,https://23.23.23.23/website1/default.aspx is displayed, instead of
http://www.mycompanyA.com/default.aspx, we don't want to display our IP
address, how to do this?

Thanks in advance!

"Kristofer Gafvert [MVP]" wrote:

> Okay, that explains what you see. You will need to contact your ISP to
> find a solution to this, because IIS does not seem to get any host header
> when this forwarding is involved (assuming that your ISP has properly
> configured the DNS server and that it should point to the IP of their
> server, and not yours).
>
> There does not seem to be anything wrong with IIS at this point.
>
> --
> Regards,
> Kristofer Gafvert (IIS MVP)
> http://www.gafvert.info/iis/ - IIS Related Info
>
>
> Newbie wrote:
>
>

Kristofer Gafvert [MVP]

2005-08-25, 6:04 pm

It sounds like some redirection is happening. When someone type in
http://www.mycompanyA.com, your ISP redirects this to
http://23.23.23.23/website1/

I say this because you cannot point www.mycompanyA.com to an IP _and_
folder. Again, i suggest that you contact your ISP to get this sorted out.


--
Regards,
Kristofer Gafvert (IIS MVP)
http://www.gafvert.info/iis/ - IIS Related Info


Newbie wrote:
[vbcol=seagreen]
>Hi, Kristofer:
>
>I developed two websites, website1 and website2, I can access them using
>the
>IP address like this: https://23.23.23.23/website1/ or
>https://23.23.23.23/website2/
>
>I registered a domain with my ISP, for example: www.mycompanyA.com to point
>to https://23.23.23.23/website1/, so when you type
>http://www.mycompanyA.com/ in the brower, website1 will be displayed. That
>is
>fine. But in the Address bar of the
>brower,https://23.23.23.23/website1/default.aspx is displayed, instead of
>http://www.mycompanyA.com/default.aspx, we don't want to display our IP
>address, how to do this?
>
>Thanks in advance!
>
>"Kristofer Gafvert [MVP]" wrote:
>
Newbie

2005-08-25, 6:04 pm

Kristofer:

Thanks again for your quick reply!

Instead of using subfolders for my two websites (website1,website2), can I
create two website services using the same IP address but different port
number?

"Kristofer Gafvert [MVP]" wrote:

> It sounds like some redirection is happening. When someone type in
> http://www.mycompanyA.com, your ISP redirects this to
> http://23.23.23.23/website1/
>
> I say this because you cannot point www.mycompanyA.com to an IP _and_
> folder. Again, i suggest that you contact your ISP to get this sorted out.
>
>
> --
> Regards,
> Kristofer Gafvert (IIS MVP)
> http://www.gafvert.info/iis/ - IIS Related Info
>
>
> Newbie wrote:
>
>

Dave

2005-08-25, 6:04 pm

you can also look at host headers if you are running a real server or try
the 'cloaking' method here: http://www.simpledns.com/tutor/webredir.asp

"Newbie" <Newbie@discussions.microsoft.com> wrote in message
news:22DE5259-EF6E-497E-AE9E-5C97F312C349@microsoft.com...[vbcol=seagreen]
> Kristofer:
>
> Thanks again for your quick reply!
>
> Instead of using subfolders for my two websites (website1,website2), can I
> create two website services using the same IP address but different port
> number?
>
> "Kristofer Gafvert [MVP]" wrote:
>


Kristofer Gafvert [MVP]

2005-08-25, 6:04 pm

Yes, you may do that. You can do this from the IIS Manager.


--
Regards,
Kristofer Gafvert (IIS MVP)
http://www.gafvert.info/iis/ - IIS Related Info


Newbie wrote:
[vbcol=seagreen]
>Kristofer:
>
>Thanks again for your quick reply!
>
>Instead of using subfolders for my two websites (website1,website2), can I
>create two website services using the same IP address but different port
>number?
>
>"Kristofer Gafvert [MVP]" wrote:
>
Newbie

2005-08-25, 6:04 pm

Dave:

The "cloaking" method is used on the ISP server. I am not running a real
server. Thanks for you information.

"Dave" wrote:

> you can also look at host headers if you are running a real server or try
> the 'cloaking' method here: http://www.simpledns.com/tutor/webredir.asp
>
> "Newbie" <Newbie@discussions.microsoft.com> wrote in message
> news:22DE5259-EF6E-497E-AE9E-5C97F312C349@microsoft.com...
>
>
>

Newbie

2005-08-26, 5:59 pm

I created another web site service using the same address for example
23.23.23.23, and set the port number to 80, changed the other web site
services to use different port number instead of 80.

I registered a domain with my ISP, for example mycompany.com to point to
http://23.23.23.23/default.aspx, so the domain is pointing to an IP instead
of IP + subfolder. The redirection works, but it still displays the IP on the
Address bar of the Browser window.

Any idea?

Thanks in advance!

"Kristofer Gafvert [MVP]" wrote:

> Yes, you may do that. You can do this from the IIS Manager.
>
>
> --
> Regards,
> Kristofer Gafvert (IIS MVP)
> http://www.gafvert.info/iis/ - IIS Related Info
>
>
> Newbie wrote:
>
>

Dave

2005-08-26, 5:59 pm

do you give the isp you register with the url or just the ip address?? if
its a url then you will probably have to ask them since they are doing the
redirection.

"Newbie" <Newbie@discussions.microsoft.com> wrote in message
news:113FB5A5-EA83-4FE0-8A57-61BAF615999A@microsoft.com...[vbcol=seagreen]
>I created another web site service using the same address for example
> 23.23.23.23, and set the port number to 80, changed the other web site
> services to use different port number instead of 80.
>
> I registered a domain with my ISP, for example mycompany.com to point to
> http://23.23.23.23/default.aspx, so the domain is pointing to an IP
> instead
> of IP + subfolder. The redirection works, but it still displays the IP on
> the
> Address bar of the Browser window.
>
> Any idea?
>
> Thanks in advance!
>
> "Kristofer Gafvert [MVP]" wrote:
>


Newbie

2005-08-26, 5:59 pm

I registered with my ISP is something like this:
domain name: mycompany.com
forword to: http://23.23.23.23/

"Dave" wrote:

> do you give the isp you register with the url or just the ip address?? if
> its a url then you will probably have to ask them since they are doing the
> redirection.
>
> "Newbie" <Newbie@discussions.microsoft.com> wrote in message
> news:113FB5A5-EA83-4FE0-8A57-61BAF615999A@microsoft.com...
>
>
>

Dave

2005-08-26, 5:59 pm

then ask them how they are doing the forwarding. it sounds like they are
doing a redirection for you, so you don't really have the ip address
associated with the domain name, they have it and when someone queries their
server for mycompany.com they redirect it to your ip address. the 'better'
way is for your server to have a static ip address and to register the
domain name to go to your server directly, then you can use host headers or
your own redirection to send it however you want.

"Newbie" <Newbie@discussions.microsoft.com> wrote in message
news:1A3BEDF2-DEFE-41B1-9184-1D4895D3B6D6@microsoft.com...[vbcol=seagreen]
>I registered with my ISP is something like this:
> domain name: mycompany.com
> forword to: http://23.23.23.23/
>
> "Dave" wrote:
>


Kristofer Gafvert [MVP]

2005-08-26, 5:59 pm

Does this redirection rewrite the URL?

What you describe is not standard behavior by IIS. So it must be someting
that is happening due to a third-party.

Have you tried to request the webpage using a tool such a WFetch (from IIS
6.0 resource kit tools) so you can see what reply you get, and from what?


--
Regards,
Kristofer Gafvert (IIS MVP)
http://www.gafvert.info/iis/ - IIS Related Info


Newbie wrote:
[vbcol=seagreen]
>I created another web site service using the same address for example
>23.23.23.23, and set the port number to 80, changed the other web site
>services to use different port number instead of 80.
>
>I registered a domain with my ISP, for example mycompany.com to point to
>http://23.23.23.23/default.aspx, so the domain is pointing to an IP instead
>of IP + subfolder. The redirection works, but it still displays the IP on
>the
>Address bar of the Browser window.
>
>Any idea?
>
>Thanks in advance!
>
>"Kristofer Gafvert [MVP]" wrote:
>
Newbie

2005-08-26, 5:59 pm

When I set the Host Header to mycompany.com, the redirection won't work, if I
type http://www.mycompany.com/ in Browser, it returns Bad Request(Invalid
Hostname), is this because my IP is not static?

Thans

"Dave" wrote:
[vbcol=seagreen]
> then ask them how they are doing the forwarding. it sounds like they are
> doing a redirection for you, so you don't really have the ip address
> associated with the domain name, they have it and when someone queries their
> server for mycompany.com they redirect it to your ip address. the 'better'
> way is for your server to have a static ip address and to register the
> domain name to go to your server directly, then you can use host headers or
> your own redirection to send it however you want.
>
> "Newbie" <Newbie@discussions.microsoft.com> wrote in message
> news:1A3BEDF2-DEFE-41B1-9184-1D4895D3B6D6@microsoft.com...
Dave

2005-08-26, 5:59 pm

it is probably because mycompany.com is not pointing at the ip on your
server, it is going to your isp and they are doing something with it. you
can try a ping or tracert to your domain name and see where it is really
going, if its not going to the ip on your server then that is where to start
looking.

"Newbie" <Newbie@discussions.microsoft.com> wrote in message
news:B9022ADD-8641-4C93-841D-0D5623C79015@microsoft.com...[vbcol=seagreen]
> When I set the Host Header to mycompany.com, the redirection won't work,
> if I
> type http://www.mycompany.com/ in Browser, it returns Bad Request(Invalid
> Hostname), is this because my IP is not static?
>
> Thans
>
> "Dave" wrote:
>


Newbie

2005-08-26, 5:59 pm

I tried the WFetch tool, I did not get my page, it connected to
http://www.mycompany.com/default.aspx, but one of the output is:

<html><head><title>Objet Moved</title></head></html>

Is this normal?

"Kristofer Gafvert [MVP]" wrote:

> Does this redirection rewrite the URL?
>
> What you describe is not standard behavior by IIS. So it must be someting
> that is happening due to a third-party.
>
> Have you tried to request the webpage using a tool such a WFetch (from IIS
> 6.0 resource kit tools) so you can see what reply you get, and from what?
>
>
> --
> Regards,
> Kristofer Gafvert (IIS MVP)
> http://www.gafvert.info/iis/ - IIS Related Info
>
>
> Newbie wrote:
>
>

Kristofer Gafvert [MVP]

2005-08-26, 5:59 pm

Well, if the object is moved, then it is normal. But in your case, i think
that this is not coming from your server, but from another server (a
server hosted by your ISP). This server then instructs the client to make
a new request, using the IP (and that is the redirecting you have been
talking about all the time).

But i cannot say if this guess is true, because i don't see what you see.
You should see what server header was returned, and that could give you a
hint. You can also compare this to the IIS log file on your machine and
see if you have these requests. Also have a look at where this "object is
moved". Does this include the IP of your server? If so, then that is where
your client is getting the IP, and that is why it is showing the IP in the
address bar.


--
Regards,
Kristofer Gafvert (IIS MVP)
http://www.gafvert.info/iis/ - IIS Related Info


Newbie wrote:
[vbcol=seagreen]
>I tried the WFetch tool, I did not get my page, it connected to
>http://www.mycompany.com/default.aspx, but one of the output is:
>
><html><head><title>Objet Moved</title></head></html>
>
>Is this normal?
>
>"Kristofer Gafvert [MVP]" wrote:
>
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com