Re: Send a request to another apache server

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

 



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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[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