Testing IIS websites locally over virtual machines
-
I'm running IIS on Windows 7 to test a website locally. How can I access my local site through my virtual machines? I'd like to test my website locally across multiple browsers before putting them into our staging environment. I have two virtual XP machines set up on my Windows 7 laptop, with various browser versions on each. I want to be able to see my locally-hosted site on these virtual machines. For example, I have http://site.leia.dev pointing to my folder of files on my Windows 7 laptop. I can view that URL in my Windows 7 browsers. In my IIS settings for the site, I have the bindings for "all unassigned" IP addresses on port 80 to use site.leia.dev as the host name. Is there a network setting I'm missing to make my virtual machines recognize IIS as a server? Is there a specific IP address I should use instead of my host name?
-
Answer:
I would use your IP address unless there's some reason you need to use DNS. In that case you need to make sure that DNS is setup correctly on the other machines. To get the IP from the Win7 box, cmd -> ipconfig.
LeiaS at Ask.Metafilter.Com Visit the source
Other answers
Totally a guess: point the VM's browser to the host machine's IP address. E.g. opening http://192.168.0.101/ should get your website's index.htm page (if the host is at 192.168.0.1 of course)
anadem
If you're using the most common arrangement for VM networking, each of your VMs will be behind NAT, and will be running in its own little network world; from the VM point of view, your host machine is somewhere out there in the cloud. That means that the usual internal methods that Windows uses to associate a local machine's host name with its IP addresses are not available to the VMs. They can use those methods to associate their own names with their own IP addresses, but they need to do the same kind of lookup to find the IP address of the machine that hosts them as they would do for any other machine in the cloud. So you have some choices. From simplest to most complicated: you can (a) access your web server via its IP address, rather than by name (b) make an entry in each VM's HOSTS file (usually at C:\WINDOWS\system32\drivers\etc\HOSTS) that associates a name with the server's IP address or (c) fiddle about with DNS. This last option will range from really easy to moderately annoying depending on how your VM hosting software deals with DNS.
flabdablet
If you have the VM set up to use NAT internally, it will take the internal IP of your host PC, then create a NAT network under that again (such as 10.0.0.x network), so you're effectively being NAT'd twice inside your VMs. You don't want this. The VM should be set up to bridge into your main internal network. This way, it should be able to access the entire internal network (usually 192.168.x.x). As an example for this, I modified a XP vm in VirualBox, added a network interface (kept the original NAT interface just in case), and told this new interface to bridge to my primary hardware NIC. When it started up, it got a DHCP address from my main router and I was able to connect to my local file server.
ijoyner
Related Q & A:
- How to create some virtual machines in linux?Best solution by howtogeek.com
- Is testing through secondary testing app white box testing?Best solution by searchsecurity.techtarget.com
- What would be some good ways to advertise locally?Best solution by Yahoo! Answers
- What are some fun kids virtual websites?Best solution by Yahoo! Answers
- Any suggestions where a 14 year old can work locally?Best solution by jobsearch.about.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.