I have a dedicated server running apache2 and I want to have several virtual machine (for different development environment). I already succeeded creating virtual machines using virtualbox.
My server has a static IP on the web, and I have a domain name.
I would like to make my subdomain via virtual hosts on apache redirecting to a virtual machine.
Is it possible ? How ?
I'm sorry if a question like this already exists, I don't know what keywords to search.
Thank you.
Best Answer
First setup NAT in virtualbox for the services you want to expose on your guest virtual machines.
Then in your apache configuration add the reverse proxy configuration.
Assuming your host's port
7890
translates to your guest's port80
(or the relevant port for the service you are exposing) you could do the following.You will need to enable the
proxy
andproxy_http
apache modules (sudo a2enmod http http_proxy
on Ubuntu).