httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julien Gerhards <jgerha...@r-advertising.com>
Subject [users@httpd] Mod-rewrite+Mod_proxy+Mod_cache
Date Tue, 05 May 2009 09:32:00 GMT
Hi,

I need to build an proxy cache server with a very simple url_rewrite :

The server sould receive URL like this :
http://myserver/img=httpd%3A%2F%2Fotherwebserver%2Fpath%2Ffile

and act as proxy/cache and give the file : 

http://otherwebserver/path/file

I tried the following conf :

<IfModule mod_proxy.c>
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteCond %{REQUEST_URI} ^/img=*
RewriteRule ^img=([^*]+)$ $0 [L,P]
RewriteLog /var/log/RewriteLog.log
</IfModule>

AllowEncodedSlashes on
ProxyRequests On

<Proxy *>
    Order deny,allow
   allow from all
#    Allow from .example.com
</Proxy>

ProxyRequests On
ProxyVia On
<IfModule mod_disk_cache.c>
   CacheEnable disk /
   CacheRoot "/var/cache/mod_proxy"
</IfModule>
<IfModule mod_mem_cache.c>
   CacheEnable mem /
   MCacheMaxObjectSize 1024000
   MCacheSize 102400
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/img=*
RewriteRule ^/img=([^*]+)$ $0 [L,P]
RewriteLog /var/log/RewriteLog.log
</IfModule>
</IfModule>

And

<Directory />
    Options FollowSymLinks
    AllowOverride FileInfo
</Directory>




 
Julien GERHARDS


---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message