Beginner General Networking Question

Started by
1 comment, last by dantesinferno 12 years, 2 months ago
So for various reasons I am running multiple virtual machines on my computer in vbox (Host pc is ubuntu)
Each virtual machine is used for different things... I have one for personal sites, and ones for various side projects.
I keep the code and configuration completely separate.

Now through what I use currently with bridged networking each one gets it's own IP address with the router forwarding different ports to different IPs.

But what if I want to use the same port(80) for multiple virtual machines and have the request directed to the appropriate virtual machine IP based on hostname (Similar to apache virtual hosts)

Could I set up apache on my host (ubuntu) machine to redirect to one of these virtual machines' IP addresses based on host name?

Thank you in advance.

dantesinferno
Advertisement
Basically, you want to use port forwarding to accomplish this. Apache should be able to do the port forwarding to the IP:PORT of your choice. That is assuming you are using different IPs for each of your VMs in your virtual network on your virtual host. if you're not, you'll probably want to set it up that way so you can.
I'll mess with it a little later and see if I can get it working. Thanks for your reply.

This topic is closed to new replies.

Advertisement