Home » Questions » Computers [ Ask a new question ]

How to setup virtual PC with php and access it from PC host?

How to setup virtual PC with php and access it from PC host?

I want to put a php server on Virtual PC but can't figure out how to connect to it from PC Host. Is there something special to do or to know about network config ?

Asked by: Guest | Views: 304
Total answers/comments: 1
Guest [Entry]

"By default, Virtual PC's usually use nat for networking, but it does depend on the virtualisation software used.

This means that to any other machine on your network, it will look like the IP of the host machine and you need to manually forward a port from your host machine in to the virtual machine.

The easiest thing you can do is go to the virtual machine settings and change the network card to use bridged mode.

This will go via DHCP and acquire its own IP address and settings. Then, to any other machine on your network, it will just look like another machine.

You should be able to set up PHP/Apache/IIS/Anything within the virtual machine just fine and you will be able to access from any machine on your network and if you change a rule on your router, you should be able to access from internet without any problem.

Unless I am doing work from one virtual machine to another that does not require internet access, I always choose bridged mode. It is by far the easiest to diagnose and use as it always appears and acts like any other machine on your physical network."