Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

What right now http://test.example.com is connecting to my WinXP computer with apache. the router is directing all connections from port 80 to my local ip.

However now I want http://vm.example.com to connect to my linux server running on VMware 7 What network adapter should I use and what method to connect to the VM via http://vm.example.com does the router do this? or should my xp machine?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

To clarify: your Linux VM is running in VMWare on the XP machine that also runs Apache? If so then all you should need to do is:

  1. Use a bridged network adaptor. If you have more than one, ensure that the one you are using is connected to the right physical network adaptor (you probably only have one, and it is most likely set to "auto", and has most likely picked the right physical adaptor, but if you have trouble such as it seeming to pick a wireless NIC over a wired one when the wireless isn't what you are connected through try setting up a new one explicitly bridging the right physical adaptor)

  2. Give the VM a fixed IP address just as you would a physical machine. With bridged networking it will default to getting an address from your router via DHCP. You can give it a fixed address wither by configuring one for its MAC address in your router (if it supports this) or manually configuring the network setting in the VM).

  3. Change the port forwarding rule in the router to point to that address instead of the host machine's address.

If you want both the host's Apache instance and the web server in the VM to respond to http requests from the outside world then you will either need to have more than one public IP address or you will need to run one of the servers on a port other than the standard port 80.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.