httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From solprovi...@apache.org
Subject Re: [users@httpd] Send a request to another apache server
Date Fri, 18 Jul 2008 18:23:39 GMT
Hi Chris,

Restating the problem: You are firewalling the Internet by having one
Web server answer to port 80.  You want some traffic to be passed from
your Web server to an application server (for webmail, but the
application is irrelevant.)  This is a standard Web proxy.

First choose whether the URL is a virtual server or a path:
   http://webmail.example.com/
   http://www.example.com/webmail/
This is cosmetic for usability, but determines the configuration
settings needed.

Then configure Apache httpd to proxy those requests to the application server.
If using a distinct server name, use a Virtual Server.
If using a path, add the configuration to the main server's configuration.

I believe both can be handled with ProxyPass, but we do not use that.
One of our production systems uses Rewrites in the Virtual Server
configuration:
       RewriteEngine On
       RewriteRule ^/(.*)$ http://webmail.example.com:8080//$1 [P]
       ProxyPassReverseCookieDomain webmail.example.com example.com
       ProxyPassReverse /       http://webmail.example.com:8080/
Note: We use the IP Address for the internal server rather than
"webmail.example.com".

If you use a path, the RewriteRule would need adjustment:
       RewriteRule ^/webmail/(.*)$ http://webmail.example.com:8080//$1 [P]

HTH,
solprovider

P.S. "example.com", "example.net", and "example.org" were reserved for
examples so people do not create URLs to other domains when no real
domain is needed.

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


Mime
View raw message