Jump to content

Unable to access website in Virtual machine from host computer

so i have a server 2012 running in VMWare and i have a website setup in it using IIS. the website runs well within the server but i cant access this from my host computer. Every time i try from my host computer i get error 404 when trying to access using IP address. got site cant b reached error when trying using domain name. when i tried accessing using ip address with port in url i got http error 400. I read similar problems online and saw suggestions asking to check if firewall is blocking port 80.i disabled firewall in both host and server but no change. i also set port forwarding in my router and forwarded port 8080 to the IP of the website but still nothing. Im running the VM as a bridged network. i have setup an FTP server too and that works well. no idea why this doesnt. any help to fix this would be appreciated.thanks

Link to comment
Share on other sites

Link to post
Share on other sites

Well what port are you running it on, 80 or 8080? It's sounds like you're not sure.

If you're interested in a product please download and read the manual first.

Don't forget to tag or quote in your reply if you want me to know you've answered or have another question.

Link to comment
Share on other sites

Link to post
Share on other sites

18 minutes ago, keskparane said:

Well what port are you running it on, 80 or 8080? It's sounds like you're not sure.

im running the website in 8080. i also tried port forwarding of this port in router as well to the IP of the website. that didnt fix it

Link to comment
Share on other sites

Link to post
Share on other sites

i didnt get what u said here:

4 minutes ago, AbsoluteFool said:

Tried navigate to host-ip/document instead of just the host-ip itself? 

 

I believe i set the DNS correctly. i have setup forward lookup and reverse lookup zones and binded the website to the IP address of it. everything works well within the server but its not accessible from my host computer even though both are on same network

Link to comment
Share on other sites

Link to post
Share on other sites

5 hours ago, keskparane said:

He means type the full address. eg http://localhost:8080/index.htm not just the host http://localhost:8080

 

16 hours ago, AbsoluteFool said:

Tried navigate to host-ip/document instead of just the host-ip itself? 

oh yes i did try accessing like this with the port number but i get "site cant be reached" error in chrome when i try from the host computer. however when i tried from the VM its all good. i suspect if its the VM network adapter settings, but im not sure as im still able to access my FTP server running in the same VM from the host. at the moment im using bridged network option. 

Link to comment
Share on other sites

Link to post
Share on other sites

has the VM network settings been set to share the hosts IP or does it have its own?

if it does have its own, it should be able to access it as it is communicating like a non-virtualised system

if it doesn't, this is probably why you can't access it, since it is sharing the host IP, it can't host webservers as they need their own non-shared up

virtual machines are a bitch to deal with...

talking from experience... 

 

*Insert Witty Signature here*

System Config: https://au.pcpartpicker.com/list/Tncs9N

 

Link to comment
Share on other sites

Link to post
Share on other sites

5 hours ago, Salv8 (sam) said:

has the VM network settings been set to share the hosts IP or does it have its own?

if it does have its own, it should be able to access it as it is communicating like a non-virtualised system

if it doesn't, this is probably why you can't access it, since it is sharing the host IP, it can't host webservers as they need their own non-shared up

virtual machines are a bitch to deal with...

talking from experience... 

 

The VM network setting has been setup as bridged, so i guess it is using the host IP. however i have setup a static IP in the server running as the VM and im able to ping it as well. i have added a couple more IP addresses in this server and linked it to domain names using DNS so that i can use them as domains in my website in IIS. i noticed yesterday that im able to view the domain name by nslookup command of this IP within the server but im not able to view it from the host. However i can ping this IP from the host.

vm.JPG

Link to comment
Share on other sites

Link to post
Share on other sites

On 2/26/2018 at 6:12 PM, Shammikit said:

-snip-

if you have a spare network port, try configuring the VM to exclusively use that, that should work..

if not, something is wrong with your website's network configuration and you may have to play around with it

*Insert Witty Signature here*

System Config: https://au.pcpartpicker.com/list/Tncs9N

 

Link to comment
Share on other sites

Link to post
Share on other sites

Have you disabled the firewall inside the VM? Since it is bridged, change it back to DHCP and verify what IP it gets (should be on the same subnet as your main desktop). 

 

check your bindings in IIS, make sure the hostname is blank and the port is what you want or else IIS will reject the connection. Get it working and accessible by IP address to rule out DNS issues. Once that works then start trying to access it by hostname.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×