Monday, March 31, 2008

PROXY for PEAR channel

I recently submitted a bug report on PEAR regarding a long standing issue with the PEAR installer tool: there is no support for HTTP 302 (redirect). This condition effectively limits the hosting possibilities of PEAR channels e.g. a PEAR channel can not be accessible through a DNS cname aliases.


Suppose I have hosted a PEAR REST channel on Google Project @ and now I would like to make this channel friendly through a nicer URL like " ".
(note that the above is just an example: the channel on which I used the method described below in not yet publicly available)


The solution involves setting up a PROXY. This time around I have managed the feat with Apache using proxy_module '' : in my vhost configuration, I have added:



DocumentRoot /var/www/vhosts/

#NOTE: not strictly required for the PROXY functionality
SetOutputFilter DEFLATE

ProxyRequests Off
ProxyPass /
ProxyPassReverse /