Apache httpd.conf for image proxy

Does anyone have an example of a successful httpd.conf proxy configuration; i.e. for use with DefaultProxy(’/proxy/’) ?


Still wondering if anyone has had any luck with this.

I’ve tried many combinations of RewriteRule and ProxyPassMatch with no luck:

RewriteRule /imgProxy(.*) proxy%{query_string}?

ProxyPassMatch ^proxyhttp://(.*)$ http://$1

Any help would be appreciated.

This works for me on Apache 2.2.31. Note that this only works for proxying absolute URLs. Protocol-relative URLs as used by default in Cesium won’t work.

RewriteEngine on

RewriteMap unescape int:unescape

RewriteRule ^/proxy/ ${unescape:%{QUERY_STRING}} [P]

Header set Access-Control-Allow-Origin “*”

It works. Thanks! The only thing I’d add for others is that the imagery/terrain provider option to go with your httpd.conf command is:

proxy : new Cesium.DefaultProxy(’/proxy/’)

My only point being to pay attention to the forward slashes.

It would be great if Scott’s httpd.conf info could be added to the imagery provider tutorial or to the DefaultProxy reference.

Thanks again. Matt.