Re: 1 Public IP Many Servers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Feb 18, 2012 at 4:40 PM, Chris Arnold <carnold@xxxxxxxxxxxxxxxxxxx> wrote:
Apache2.2.3 on SLES10. I was hoping my firewall (sonicwall tz180w enhanced software) would do this but it looks like it might not. We have 4 servers with private ip's and our firewall has 1 public ip. These servers run different services like mail, web and the other things. We are looking at another service (ticketing system) that can not run on but port 80. Port 80 is on the a different server. I need to know if apache is able to see an dns address and forward to the correct server. Example:
http://cloudservice.domain.com on port 80 and http://mailservice.domain.com on port 80 (these are different servers with private ip's). Can apache see the xxx://cloudservice.xx.com and forward to the correct server versus xxx://mailservice.xxx.com.
I hope what i need is clear as i am having a hard time describing it. Basically, i need same port to go to different servers based on the dns address from the outside (public ip).

You could set up a single instance of Apache that acts as a reverse proxy to the other servers.
For example:
<VirtualHost cloudservice.example.com:80>
    ServerName cloudservice.example.com
    ProxyPass / http://192.168.1.10/
    ProxyPassReverse / http://192.168.1.10/
</VirtualHost>
<VirtualHost mailservice.example.com:80>
    ServerName mailservice.example.com
    ProxyPass / http://192.168.1.11/
    ProxyPassReverse / http://192.168.1.11/
</VirtualHost>

Note that I did not test these configs, this is just a sample. You will probably want some kind of security (SSL, maybe using SNI if you do not have clients using IE or Chrome on Windows XP.)
http://httpd.apache.org/docs/2.0/mod/mod_proxy.html#proxypassreverse

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux