httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julian H. Stacey" <>
Subject [users@httpd] how to get httpd to use a proxy, cascading to a 2nd proxy ?
Date Wed, 01 Apr 2015 22:50:03 GMT
Hi all on
Can httpd _use_ (not just _be_) a proxy, cascading to a 2nd proxy on a gate ?

(Not just the common case of httpd serving as a proxy for down stream clients,
 though I need that too on same httpd,  I already have that part working)

I want to get httpd on an internal host to serve as a proxy to a
USB tethered android (which it is already doing), + to pass requests
over ethernet LAN to a 2nd proxy on a LAN gateway. 

This may seem unusual, here's the reason:
	An android is tethered (IP over USB) to a FreeBSD PC laptop,
	Orweb browser on Android allows use of a proxy, FreeBSD
	laptop runs apache 2.2.29 httpd (listening on the USB IP)
	with httpd proxy enabled & PC allows android to reach various httpd PCs
	on local LAN of the PC.

	I now want to tell the httpd on the PC interfacing the android,
	to pass android requests to a 2nd httpd running on the gateway host,
	to reach the internet.

Why ? Why dont I just configure the FreeBSD PC to bridge packets
from USB to LAN ethernet, & on to LAN gate ?
  - I may later want a firewall on the laptop ( to protect LAN from lots of
    untrusted android binaries, + android WLAN & SIM interfaces).
  - Pragmaticaly , I've tried & failed to create a bridge, 
    I think the FreeBSD PC side is OK:
  	/etc/rc.conf gateway_enable="YES"  + 
  	sysctl net.inet.ip.forwarding=1
    But Android rejects syntaxes such as
  	route add default
  	route add default gw
  	route add default gw dev eth0
    & no manuals, & I'm new to Android (but familiar with Apache & FreeBSD)

If httpd wont use a proxy, maybe I'll try packet diversion
via FreeBSD's ipfw,  but I'm hoping Apache httpd can use a proxy ?

I've read
& contemplated nasty cludges eg:
	1st httpd on PC connected to android:
		<VirtualHost    *>
		Redirect temp /store/apps http://gate/playgoogle
	2nd httpd on LAN gate:
		Redirect temp /playgoogle
But it would be Ugly & wouldnt work for other URLs, eg when android map apps
go other places to load maps etc.

Maybe there's some clever mapping with
1st httpd to be receive request
& emit
& 2nd=gate to redirect to

Ideas / suggestions please ?

Julian Stacey, BSD Linux Unix C Sys Eng Consultant Munich
	Indent previous with "> ".	Reply Below as a play script.
	Send plain text, Not quoted-printable, HTML, or base64.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message