You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Chris Arnold <ca...@electrichendrix.com> on 2012/02/18 22:40:37 UTC

[users@httpd] 1 Public IP Many Servers

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).

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] 1 Public IP Many Servers

Posted by Mauricio Tavares <ra...@gmail.com>.
On 02/18/2012 04:40 PM, Chris Arnold 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).
>
	I do not know if I understood the question but you can have a bunch of 
different websites with their own ip addresses in one apache server. 
That is usually done if they have their own unique certs AFAIK. I would 
imagine you can do fancier stuff too if you throw more servers at it, 
like have one external box that then forward the different requests to 
the proper web servers in your DMZ/private net.

	That said, it is rather silly the sonicwall cannot listen to more than 
one external IP. I mean, that is beyond trivial in your garden-variety 
Linux or Solaris or what have you. And AFAIK sonicwall is linux-based.

Can't it at least have rules based on external FQDNs?

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] 1 Public IP Many Servers

Posted by Chris Arnold <ca...@electrichendrix.com>.
On Feb 18, 2012, at 9:34 PM, Yehuda Katz <ye...@ymkatz.net> wrote:

> On Sat, Feb 18, 2012 at 9:22 PM, Chris Arnold <ca...@electrichendrix.com> wrote:
> On Feb 18, 2012, at 7:08 PM, Yehuda Katz <ye...@ymkatz.net> wrote:
>> On Sat, Feb 18, 2012 at 4:40 PM, Chris Arnold <ca...@electrichendrix.com> 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#
> 
> Thanks for the reply. Should I be able to add the above directive to my vhost.conf file or do I need to install and config mod_proxy? I looked in yast->software management and do not see a mod_proxy. Best I can remember, you have to install the mod_*.
> 
> mod_proxy is included in the default installation of HTTPD, I don't think openSUSE would have removed it, so there is no separate package to install.
> You should be able to copy those into vhost.conf, but as I said, I have not tested them.
> If you try it and have further questions, just post back here.

Yea, I found mod_proxy.so. So I made the entry into vhost.conf but it still goes to the wrong server. That which I am trying to forward is ifolder from the Novell install disc (not the OSS). Do you use sles 11 and ifolder? If I remember right, the ifolder piece has its own small apache instance? If you would like the web address to see what I am talking about, email me off-list.

Re: [users@httpd] 1 Public IP Many Servers

Posted by Yehuda Katz <ye...@ymkatz.net>.
On Sat, Feb 18, 2012 at 9:22 PM, Chris Arnold
<ca...@electrichendrix.com>wrote:

> On Feb 18, 2012, at 7:08 PM, Yehuda Katz <ye...@ymkatz.net> wrote:
>
> On Sat, Feb 18, 2012 at 4:40 PM, Chris Arnold <carnold@electrichendrix.com
> > 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#<http://httpd.apache.org/docs/2.0/mod/mod_proxy.html#proxypassreverse>
>
>
> Thanks for the reply. Should I be able to add the above directive to my
> vhost.conf file or do I need to install and config mod_proxy? I looked in
> yast->software management and do not see a mod_proxy. Best I can remember,
> you have to install the mod_*.
>

mod_proxy is included in the default installation of HTTPD, I don't think
openSUSE would have removed it, so there is no separate package to install.
You should be able to copy those into vhost.conf, but as I said, I have not
tested them.
If you try it and have further questions, just post back here.

Re: [users@httpd] 1 Public IP Many Servers

Posted by Chris Arnold <ca...@electrichendrix.com>.
On Feb 18, 2012, at 7:08 PM, Yehuda Katz <ye...@ymkatz.net> wrote:

> On Sat, Feb 18, 2012 at 4:40 PM, Chris Arnold <ca...@electrichendrix.com> 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#

Thanks for the reply. Should I be able to add the above directive to my vhost.conf file or do I need to install and config mod_proxy? I looked in yast->software management and do not see a mod_proxy. Best I can remember, you have to install the mod_*.

Re: [users@httpd] 1 Public IP Many Servers

Posted by Yehuda Katz <ye...@ymkatz.net>.
On Sat, Feb 18, 2012 at 4:40 PM, Chris Arnold
<ca...@electrichendrix.com>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