RE: [users@httpd] Apache proxying

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

 



> -----Original Message-----
> From: Anthony Browne [mailto:aabrowne@xxxxxxxxxxxxxxxxx]
> Sent: Freitag, 8. Juli 2005 14:41
> To: users@xxxxxxxxxxxxxxxx
> Cc: bill-carlson@xxxxxxxxx
> Subject: [users@httpd] Apache proxying
> 
> 
> 
> 
> Briefly, the questions I need quick answers to are: 

A quick answer is yes or no. Wouldn't a considered opinion be better? 
 
> Can Apache  be configured to directly proxy a request for 
> content on a remote server to the machine routing requests to 
> the Internet (the 'connection' to the Internet) after looking 
> for, and not finding, static content on the hard drive?. 

Are you implying a conditional proxying? This is possible with mod_rewrite in proxy mode. Somwething like:

RewriteCond %{REQUEST_FILENAME}   !-s
RewriteRule ^page\.html$          http://remote-server/page.html   [P]

The RewriteCond tests if the resolved filename exists locally and, if not, issues a proxy request for a resource from a remote server.

See the mod_rewrite docs for details.

> Another question would be can another Apache instance on 
> another port be chained with the original server to proxy the 
> requests to the routing machine (if so, how). 

Webservers can form arbitrarily long chains. Each link terminates the TCP/IP session and simply passes on the content. 

> 
> First some background, see below for my detailed questions. ------> 
> 
>      Our project has setup a small server that uses Apache to 
> serve web sites we collect (with permission)in schools 
> without Internet access. The server sits on their network and 
> serves up the content over their LAN. In some situations, we 
> would like to have the server behave more like a proxy server 
> for schools that have limited Internet access. If the content 
> is not found in the collection of web sites, then they would 
> be passed on to their schools internet connection and if 
> their school uses a proxy on their network with caching, then 
> that would be hit first and then the connection out. 
>      Currently, using the rewrite module, Apache tries to 
> fulfill the request from the directories on the appliance's 
> hard drive. If the content is not there (if the request is 
> for content on a remote host), Apache responds with a custom 
> error page. This essentially satisfies our goal of having the 
> appliance act as a 'stand-alone' server in situations where 
> the organization implementing the eAppliance does not have a 
> 'connection' to the Internet. 
>      Widernet needs the eAppliance to be flexible and to be 
> able to work in an organization that has a 'connection' to 
> the Internet. The appliance has to either configure itself 
> and/or have a one time configuration done by programmers at 
> the eGranary base (University of Iowa). 
>      One solution is that Apache can be configured to 
> directly proxy the request for content on a remote server to 
> the machine routing requests to the Internet (the 
> 'connection' to the Internet). Another solution would be to 
> have another Apache server on another port proxy the requests 
> to the routing machine. So, the answers we need to know quickly are 
> whether Apache can be configured this way (if so, how) or if 
> two or more Apache instances can be chained to perform the 
> same functionality. 

I don't fully understand your requirement (that's a lot to read on a Friday) but I get the gist that you'd like to serve content locally, if available, and by proxy, if not. Webservers can be configured to do almost anything and if you're already using mod_rewrite, you're on the right track. Read over the example guide: http://httpd.apache.org/docs-2.0/misc/rewriteguide.html and see if it has anything close to what you want to do.

Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored. 

> 
> Widernet programmers, University of Iowa 
>  
> 
> 
> 
> 
> ________________________________________________________________
> Sent via the WebMail system at mail.widernet.org
> 
> 
>  
>                    
> 
> 
> ---------------------------------------------------------------------
> 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
> 
> 
Diese E-mail ist eine private und persönliche Kommunikation. Sie hat keinen Bezug zur Börsen- bzw. Geschäftstätigkeit der SWX Gruppe. This e-mail is of a private and personal nature. It is not related to the exchange or business activities of the SWX Group. Le présent e-mail est un message privé et personnel, sans rapport avec l'activité boursière du Groupe SWX.
 
 
This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please notify the sender urgently and then immediately delete the message and any copies of it from your system. Please also immediately destroy any hardcopies of the message. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. The sender's company reserves the right to monitor all e-mail communications through their networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of the sender's company.

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