Sign in to follow this  

Beginner General Networking Question

This topic is 2186 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

This topic is 2186 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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

Sign in to follow this