Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

can't browse to non-default website on intranet

Posted on 2008-10-13
10
Medium Priority
?
1,039 Views
Last Modified: 2013-11-30
Newbie question. I have a home lan set up, with Windows server 2008 as domain controller with IIS 7.0, and the client computer running XP Pro.

On the client, I can browse to the default web site (which has a static IP 192.168.0.6) with no problem, but after I created a non-default web site, with IP = 'All UnAssigned', I ran into problems. I can view the default web page of the non-default web site as localhost, on the server machine (by hitting 'Browse Web Site in the IIS manager). However, on the client computer, I don't even know what URL to punch in.

When I tried using the same IP as the default web site, but set the port to :81, I got an HTTP 400 error when trying to view the default file, index.html. (after opening the firewall to port 81).

I'm trying to figure out how to make the port method work, but I'd also like to know another way. I think I saw something about exceptions and headers.
0
Comment
Question by:sperodev
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 5

Expert Comment

by:varungd
ID: 22708659
Use http://192.168.0.6:81instead of  http://localhost  and also remove 'All UnAssigned' and give the IP address.
 
0
 
LVL 12

Assisted Solution

by:Pugglewuggle
Pugglewuggle earned 240 total points
ID: 22708665
The problem is that since you're not accessing the site from the public domain name, but instead the private IP, you're not passing HTTP host headers to the individual sites. Without that info IIS cannot choose which site to serve up and sends you back the default site.
For a bit more info on what is going on, check out:
http://windowsitpro.com/article/articleid/7404/what-is-a-host-header.html
Cheers!
0
 
LVL 12

Expert Comment

by:Pugglewuggle
ID: 22708670
Also, with the port option, all pages must be configured with relative path names (i.e., all paths in the page start with a / that reference the root of the site - for example on www.stuff.com/heythere/what.jpg will look like /heythere/what.jpg in the code).
Then, just set the site's default port to whatever you want and access it with https://<SERVER_IP>:<PORT>
Cheers!
0
Understanding Web Applications

Without even knowing it, most of us are using web applications on a daily basis. Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We often confuse these web applications tools for websites.  So, what is the difference?

 
LVL 12

Expert Comment

by:Pugglewuggle
ID: 22708672
Oops! I meant:
http://<SERVER_IP>:<PORT>
Cheers!
0
 
LVL 4

Accepted Solution

by:
paritoshjani earned 260 total points
ID: 22714476
Hi,

If the purpose of website is meant for internal purpose, you can either allocate website a new IP address or you can add a value in host header (xyz.domain.com). Once done, you can add this address into host file into the computer from where you are accessing the website. The file can be found at c:\WINDOWS\system32\drivers\etc\hosts. Mention following entry:


192.168.0.6      xyz.domain.com

0
 
LVL 12

Expert Comment

by:Pugglewuggle
ID: 22714854
That is unneccesary complication.
In all development environments I've worked in sites have been developed with the port based method.
If you have more than one computer you must replicate hosts to each one and keep them synced when they change.
With the IP/port you don't need to do any of this - just access the site as I detailed above.
Cheers!
0
 

Author Comment

by:sperodev
ID: 22715503
I'm trying using hosts files, host headers, and the same port (80), for now. I only have 2 machines I'm concerned about right now, 1 server and 1 client.

The default web site works ok, but the additional web site, dev1, does not work.  I get a message "DNS Error - Server cannot be found".

Here is my hosts file on the client:

192.168.0.6   lenovo
192.168.0.6   dev1

AFAIK, there is nothing more to setting up a host header in IIS than entering the 'Host name' setting in the 'Edit Site Binding' dialog box. Is this correct?

I entered lenovo and dev1 for 'Host name', respectively. I don't think I need dev1.com, or something else more like a normal domain name, do I?

Can somebody confirm or disconfirm that I need to tweak the DNS server to make this work?
0
 

Author Comment

by:sperodev
ID: 22715592
Oops. Looks like lenovo worked because it was in the Active Directory (just learning that, too, so please bear with me). I changed lenovo to lenovows in both the host file and the 'Host name' setting on the server, and now that doesn't work, either.
0
 

Author Comment

by:sperodev
ID: 22715696
I added an A record in the DNS server for dev1, which got that working. However, doing the same thing for lenovows did not get that working. I've now put back the lenovows references to lenovo. I am going to try with another non-default web site, dev2.
0
 

Author Comment

by:sperodev
ID: 22715883
dev2 works, though it took a few minutes before the page would come up. I'm still not sure whether or not this has to do with adding records to the DNS Server. (Even after I added a DNS A record for dev2, it still was quite a few minutes before the dev2 web page would come up on the client browser).

Assuming it's the DNS, doesn anybody know how to 'kick' it, so that it uses it's updated information, immediately?

I'm also wondering if a DNS update lag might be to blame for lenovows not working on the default web site.
0

Featured Post

Simplify Your Workload with One Tool

How do you combat today’s intelligent hacker while managing multiple domains and platforms? By simplifying your workload with one tool. With Lunarpages hosting through Plesk Onyx, you can:

Automate SSL generation and installation with two clicks
Experience total server control

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
WARNING:   If you follow the instructions here, you will wipe out your VTP and VLAN configurations.  Make sure you have backed up your switch!!! I recently had some issues with a few low-end Cisco routers (RV325) and I opened a case with Cisco TA…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question