Multiple VPS with apache and mail behind 1 public IP
-
Hi all,
I have a question which bothers me from some time. Is it possible to have multiple VPS / with different internal IP's / every to have a mail server and apache with vhosts behind a router distro with 1 public IP? I dont know how to make this kind of redirection, because I am only limited to one public IP from my ISP. Can pfSense do this? I was thinking of redirecting all ports to one VPS with apache and then from the httpd.conf to redirect to the other servers. But this way is too time taking and anyway I cant figure a way out to this with the mail.
Thanks in advance.
Gabriel
PS I dont' really know in which section to post. If needed please move it to the right section. -
hi!
if you have one public IP from ISP then you can not have multiple using virtual IPs. But you can redirect different ports to diffrent servers on LAN. For instance, port 25 - to mail server, ports 80 and 443 to apache server. -
Yes I know but can I make somehow a redirection based on the header, so that it knows which vritual server is the holder of thta site. I thought maybe editing httpd.conf, or mod_proxy but dont have the time to try it for now, what about the mail? I cant think of a way there.
-
pfSense can't do that for you.
For email the mail server doesn't know what hostname the remote server was connecting to. All it knows is what username(s) the remote server wants to send email to (and for). As such you can only have a single email server on a single IP.
-
And is there a way of doing the apache stuff with another router distro? Can you recomend one?
-
You need something with a reverse proxy (hint, search the forum - it's been discussed many times). I'm not aware of any distro that's designed to do that out of the box. You'll either need to invest the effort into learning how to do it (probably by following one of the many guides you can find through Google) or pay somebody.