Single IP e more server Web.
-
Meanwhile, happy new year to all friends on this forum.
With a single IP address I will hijack everything on an Apache server and Apache will then hijack the various domains on the individual Virtual Servers.
So domain1, domain2 and domain3 will all be associated with a single IP and will be managed by a single Apache server.But when there are more than one Apache servers, how do I do it?
For example domain1 and domain2 must be managed by Server-A, while domain 3 must be managed by Server-B.
Both should be in a DMZ.
Furthermore, the IP is dynamic, so I already have the problem of activating a DDNS as well.Thanks in advance for the advice.
-
@whitetiger-it
This can only be done at the application layer. It's necessary to read out the HTTP host header.So if you want to do that on pfSense you will need to run a proxy server package like HAproxy.
@whitetiger-it said in Single IP e more server Web.:
Furthermore, the IP is dynamic, so I already have the problem of activating a DDNS as well.
That doesn't make any difference. You need a public DNS and an entry for each host, people should be able to access.
If you have a dynamic IP you have to use a DDNS and configure pfSense to update it for each host name. -
@viragomann said in Single IP e more server Web.:
This can only be done at the application layer. It's necessary to read out the HTTP host header.
So if you want to do that on pfSense you will need to run a proxy server package like HAproxy.But I don't want to balance the load, but split it across two servers. One domain goes to A and one goes to B.
Thanks for your reply.
-
@whitetiger-it said in Single IP e more server Web.:
But I don't want to balance the load, but split it across two servers. One domain goes to A and one goes to B.
That is exactly what HAproxy can do for you.
You can also configure a proxy on one of your Apache webservers itself using the proxy module. I did that on my home network. But if this one goes down both are unreachable.
-
@viragomann said in Single IP e more server Web.
That is exactly what HAproxy can do for you.
Where I find a guide to configure it?
-
@whitetiger-it
Search the web.
A simple one I used: https://www.servethehome.com/how-to-haproxy-ha-load-balance-a-web-server-with-a-pfsense-sg-4860/You may also take a look into the proxy section in this forum and post your questions there.
-
@viragomann said in Single IP e more server Web.:
@whitetiger-it
Search the web.
A simple one I used: https://www.servethehome.com/how-to-haproxy-ha-load-balance-a-web-server-with-a-pfsense-sg-4860/I had already found and read this article yesterday, but we still talk about load balancing.
Which means that if Server-A is down or too busy, HAProxy will divert traffic to Server-B.
Furthermore, this also means that the two servers have the exact same web applications.Instead, I have to send an application to one server and another application, different from the first, to the second server.
I do not find this configuration described anywhere. -
@whitetiger-it
Yeah, seems to got the wrong link. But load balancing is another feature of haproxy. There is no need to use it.Simply you set up each of your internal web servers as backend.
Then configure your host names as frontends. In this settings you can state a backend to use for that host name.
So if you have a unique host name in the frontend and stated only one backend, there is no load balancing at all.