Re: Mod-rewrite+Mod_proxy+Mod_cache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Try $1 instead of $0 ?

Julien Gerhards wrote:
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




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


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux