You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by vara prasad <vp...@gmail.com> on 2009/11/10 19:36:18 UTC

[users@httpd] Caching files on reverse proxy

Hi  All,
I have set up a reverse proxy www.example.com for an internal tomcat server
http://internal:8080
Few files are hosted on  http://internal:8080.
My requirement is when user downloads a file from http://internal:8080 using
the proxy, the proxy should cache the file with its original extension. A
.pdf file downloaded from  http://internal:8080 should be available in the
reverse proxy's cache as a .pdf file.  Can any one help to get to it?

Thanks in advance.

Re: [users@httpd] Caching files on reverse proxy

Posted by Eric Covener <co...@gmail.com>.
On Tue, Nov 10, 2009 at 8:10 PM, vara prasad <vp...@gmail.com> wrote:
> Hi Brian,
> I have set up Apache with mod_proxy with following config
> __________________
> <IfModule mod_cache.c>
> <IfModule mod_disk_cache.c>
> CacheRoot d:/apache_cache
> CacheEnable disk /
> CacheDirLevels 2
> CacheDirLength 3
> </IfModule>
> __________________
> .data and .header files are stored in cache. Is it possible to retrieve the
> cached files on Apache?

Are you trying to read files cached by Apache via the filesystem
instead of requesting them over HTTP?  Why?

Is this what you meant by the filename changing?  Do you have some
kind of Alias that points intot he d:/apache_cache?  This seems like
an awfully bad idea.

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
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


Re: [users@httpd] Caching files on reverse proxy

Posted by vara prasad <vp...@gmail.com>.
Hi Brian,

I have set up Apache with mod_proxy with following config
__________________

<IfModule mod_cache.c>
<IfModule mod_disk_cache.c>
CacheRoot d:/apache_cache
CacheEnable disk /
CacheDirLevels 2
CacheDirLength 3
</IfModule>
__________________

.data and .header files are stored in cache. Is it possible to retrieve the
cached files on Apache?

Thanks in advance.






On Wed, Nov 11, 2009 at 12:51 AM, Brian Mearns <me...@gmail.com> wrote:

> On Tue, Nov 10, 2009 at 1:36 PM, vara prasad <vp...@gmail.com>
> wrote:
> > Hi  All,
> > I have set up a reverse proxy www.example.com for an internal tomcat
> server
> > http://internal:8080
> > Few files are hosted on  http://internal:8080.
> > My requirement is when user downloads a file from http://internal:8080using
> > the proxy, the proxy should cache the file with its original extension. A
> > .pdf file downloaded from  http://internal:8080 should be available in
> the
> > reverse proxy's cache as a .pdf file.  Can any one help to get to it?
> > Thanks in advance.
> >
> >
>
> What kind of reverse proxy did you set up? Using Apache and mod_proxy,
> or some other software, like Squid? If you're using mod_proxy with
> Apache, I don't think caching is done automatically, you'll want to
> look at mod_cache: http://httpd.apache.org/docs/2.0/mod/mod_cache.html
>
> For other software, dedicated caching proxies (again, like Squid)
> usually keep their cache is a more complex way then you seem to be
> expecting. For instance, the cache may be stored partially in RAM and
> partially on disk, or in a database. At any rate, cahce entries are
> not generally stored in any kind of user-friendly way where you can
> just browse to the cache directory and look for *.pdf files. They're
> typically stored based on some sort of hashing mechanism so they can
> be quickly recovered.
>
> -Brian
>
>
> --
> Feel free to contact me using PGP Encryption:
> Key Id: 0x3AA70848
> Available from: http://keys.gnupg.net
>
> ---------------------------------------------------------------------
> 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
>
>

Re: [users@httpd] Caching files on reverse proxy

Posted by Brian Mearns <me...@gmail.com>.
On Tue, Nov 10, 2009 at 1:36 PM, vara prasad <vp...@gmail.com> wrote:
> Hi  All,
> I have set up a reverse proxy www.example.com for an internal tomcat server
> http://internal:8080
> Few files are hosted on  http://internal:8080.
> My requirement is when user downloads a file from http://internal:8080 using
> the proxy, the proxy should cache the file with its original extension. A
> .pdf file downloaded from  http://internal:8080 should be available in the
> reverse proxy's cache as a .pdf file.  Can any one help to get to it?
> Thanks in advance.
>
>

What kind of reverse proxy did you set up? Using Apache and mod_proxy,
or some other software, like Squid? If you're using mod_proxy with
Apache, I don't think caching is done automatically, you'll want to
look at mod_cache: http://httpd.apache.org/docs/2.0/mod/mod_cache.html

For other software, dedicated caching proxies (again, like Squid)
usually keep their cache is a more complex way then you seem to be
expecting. For instance, the cache may be stored partially in RAM and
partially on disk, or in a database. At any rate, cahce entries are
not generally stored in any kind of user-friendly way where you can
just browse to the cache directory and look for *.pdf files. They're
typically stored based on some sort of hashing mechanism so they can
be quickly recovered.

-Brian


-- 
Feel free to contact me using PGP Encryption:
Key Id: 0x3AA70848
Available from: http://keys.gnupg.net

---------------------------------------------------------------------
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