Linux - Virtualization and CloudThis forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have several websites running on VMs, each with its own domain/subdomain and internal IP address. But I have only one Fixed IP. Please advise how set up their static IP so that they can be evoked on Internet?
Simple way is running HA Proxy. Here are the steps
Hi,
Thanks for your advice.
Quote:
* Install HA Proxy
Do I need install HA Proxy on the host? Can I install HA Proxy on a VM? Because I expect keeping the host clean solely for running VirtualBox. If I have to install it on the host I'll get another machine for this test.
on the router, for exmple;
VM1 internal IP -> 192.168.0.1
VM2 internal IP -> 192.168.0.2
VM3 internal IP -> 192.168.0.3
VM4 internal IP -> 192.168.0.4
etc.
How to configure HA Proxy so that when domain1 is browsed on Internet it will be directed to VM1?
on the router, for exmple;
VM1 internal IP -> 192.168.0.1
VM2 internal IP -> 192.168.0.2
VM3 internal IP -> 192.168.0.3
VM4 internal IP -> 192.168.0.4
etc.
How to configure HA Proxy so that when domain1 is browsed on Internet it will be directed to VM1?
From your example, lets consider your fixed IP (where you installed HA Proxy) is 111.222.333.444, domain1 is hosted in 192.168.0.1, domain2 is hosted in 192.168.0.2 and similar for 3 & 4.
You will need to have the following config in HA Proxy config /etc/haproxy/haproxy.cfg for frontend & backend
When users hit domain1.com, HAProxy will detect that the request is for domain1.com by analyzing the HTTP request. Based on the ACL we setup, it will forward the request to 192.168.0.1 which is your VM1. The above config is very basic to get the setup working. The more study about HAProxy, you can do more
Last edited by linuxtech99; 12-25-2015 at 11:47 AM.
Hi all,
Host Ubuntu 14.04 desktop
VMs Ubuntu 14.04 desktop/server edition
VirtualBox
I have several websites running on VMs, each with its own domain/subdomain and internal IP address. But I have only one Fixed IP. Please advise how set up their static IP so that they can be evoked on Internet?
You asked this same question EIGHT YEARS AGO, and have been asking about apache for TEN. Is there some point at which you could read the documentation, or at least REFERENCE and ACKNOWLEDGE what people have 'advise' you about before???
OK. On your first question - Yes, you need to install HA Proxy on the host or the servers where the fixed IP is bound.
- snip -
Hi,
Thanks for your detail advice.
Can I build an Apache running on a VM in this box solely for running HA Proxy. Fixed/Static IP will point to this VM and Port 80 will be forwarded to this VM as well? If it can't work I'll find an old PC for this test.
You asked this same question EIGHT YEARS AGO, and have been asking about apache for TEN. Is there some point at which you could read the documentation, or at least REFERENCE and ACKNOWLEDGE what people have 'advise' you about before???
You tell us...since you read it, did you TRY IT and if so, did it WORK???? If not, tell us what actual problems you're having.
I failed to setup the network in the past and host the websites on Godaddy up-to-now.
For testing following feature provided by Godaddy;
"When the local servers are UP, readers will browse the websites on local servers. When the local servers are down, readers will browse the websites on Godaddy server."
I resume the idea to continue this setup.
I haven't tried that link because I'm NOT sure whether it is suitable for my use.
I failed to setup the network in the past and host the websites on Godaddy up-to-now.
So again, after 8 years working with Apache and asking about such things, why can't you apply any of that?
Quote:
For testing following feature provided by Godaddy;
"When the local servers are UP, readers will browse the websites on local servers. When the local servers are down, readers will browse the websites on Godaddy server."
I resume the idea to continue this setup. I haven't tried that link because I'm NOT sure whether it is suitable for my use.
So TRY IT AND FIND OUT. Again, we can help with specific problems, but you're asking people to read documentation for you, and tell you if it MIGHT fit your needs. That is YOUR task. If it does not work, post the problems you encounter, and we may be able to help. But after all these years, you should be able to do SOMETHING on your own
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.