[users@httpd] Caching files on reverse proxy

View: New views
4 Messages — Rating Filter:   Alert me  

[users@httpd] Caching files on reverse proxy

by vara prasad-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

by Brian Mearns-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Nov 10, 2009 at 1:36 PM, vara prasad <vprasad.pendyala@...> 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@...
   "   from the digest: users-digest-unsubscribe@...
For additional commands, e-mail: users-help@...


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

by vara prasad-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 <mearns.b@...> wrote:
On Tue, Nov 10, 2009 at 1:36 PM, vara prasad <vprasad.pendyala@...> 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@...
  "   from the digest: users-digest-unsubscribe@...
For additional commands, e-mail: users-help@...



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

by Eric Covener :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Nov 10, 2009 at 8:10 PM, vara prasad <vprasad.pendyala@...> 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@...

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