Forum Moderators: phranque
A part list of the domains that we retreive rss feeds from is:
getv.wordpress.com
...
twitter.com
www.flickr.com
We currently use a webapp for the proxy but, im interested in replacing that app. with a native service like mod_proxy.
In looking at mod proxy , it looks like you may need to reserve a separate node for EACH new domain that content is needed from. For Example:
ProxyPass /nod1 http://getv.wordpress.com
...
ProxyPass /nod6 http://flickr.com
is a list of directives that would handle the proxies for content coming from domains at the beginning of the list.
However, there is limitation in that each domain appears to need its own node. Each time we need to handle content from another 3rd party, we have to change config and bounce the servers.
Today , the webapp handling the 3rd party content has a request like:
http://example.com/proxy?url=http://www.twitter.com/rss.xml
The url parm value above can be anything and the app just passes it thru. But, this app is slated for retirement and mod_proxy and or mod_rewrite seem like a possible replacement.
So, the question:
Is there a more dynamic method of using a rewrite and or proxy in order to handle URL's from multiple 3rd party sites where you do not need to change config files each time a new domain is added to the list of 3rd party sites that your client tier needs access to?
[edited by: jdMorgan at 2:46 pm (utc) on Nov. 11, 2009]
[edit reason] Removed some URLs, de-linked remaining. [/edit]
Alternately, look into using mod_rewrite's [P] flag, and possibly using a RewriteMap in conjunction with that. For example, a RewriteMap would be useful if you needed to conceal the target domain, but using either of these approaches would reinstate the requirement to maintain a list of domains in the front-end (in the RewriteConds, or in the table or script called by RewriteMap). Therefore, using a "common" /ext_node path as your "proxy invocation trigger" seems like the simplest approach. The only downside is that the back-end must then take some action if the requested domain is invalid (to avoid creating an open proxy and to avoid problems caused by typos in links on your own site) and this once again reinstates the requirement to maintain a list of acceptable domains.
Jim