You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Садреев Айрат Алмазович <Sa...@kaz.transneft.ru> on 2006/02/13 08:34:20 UTC

[users@httpd] Reverse proxy and cache

	I'd like to provide access to multiple remote Web-servers via my Apache using reverse proxy. Remote Web-servers connected via low-speed channels so I'd like to use caching to speed-up content loading for clients.

	I set up reverse proxy and cache modules. The accessed files put into cache but download speed was not increased. It seems that files is reloaded every time when accessed and caching don't work actually.

	This is an excerpt from my conf file

<VirtualHost 10.10.1.2>
	ServerName www-root.in
	
  	CacheEnable disk /
	ProxyPass /vvmn/ http://10.34.1.23/
	
</VirtualHost>


	Requested URLs looks like this http://www-root.in/vvmn/pics/035457.JPG
	10.34.1.23 - IP address of the remote server.

What's wrong?

Thanks in advance.

Airat

---------------------------------------------------------------------
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] Reverse proxy and cache

Posted by Joshua Slive <jo...@slive.ca>.
On 2/14/06, Airat A. Sadreev <sa...@szmn.ru> wrote:
> > >
> > > [Mon Feb 13 17:17:30 2006] [debug] mod_cache.c(129): Adding
> > CACHE_SAVE
> > > filter for /vvmn/sdku/AK_VVMN_T.GDF [Mon Feb 13 17:17:30
> > 2006] [debug]
> > > mod_cache.c(136): Adding CACHE_REMOVE_URL filter for
> > > /vvmn/sdku/AK_VVMN_T.GDF [Mon Feb 13 17:17:30 2006] [debug]
> > > mod_proxy_http.c(54): proxy: HTTP:
> > > canonicalising URL //10.34.1.23/sdku/AK_VVMN_T.GDF
> >
> > So I'm assuming this request was for a file that was already in the?
> Yes,  it is, file in cache.
> > Then I'm not sure what is going on.  There is no indication
> > of why it isn't looking in the cache.
>
> And what shall I do?

If you don't get a better response within another day or so, search
the bug database for anything similar and then file a bug report
including the minimal test case to reproduce the problem.

>
> And another question about reverse proxy.
>
> As far as I understand, mod_proxy (via mod_proxy_http) connects to remote
> Web-server directly. Does it possible to force mod_proxy_http work through
> another proxy server?

There is the ProxyRemote directive, but I think that only works on
forward proxies.  I haven't tried it myself.

Joshua.

---------------------------------------------------------------------
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] Reverse proxy and cache

Posted by "Airat A. Sadreev" <sa...@szmn.ru>.
> >
> > [Mon Feb 13 17:17:30 2006] [debug] mod_cache.c(129): Adding 
> CACHE_SAVE 
> > filter for /vvmn/sdku/AK_VVMN_T.GDF [Mon Feb 13 17:17:30 
> 2006] [debug] 
> > mod_cache.c(136): Adding CACHE_REMOVE_URL filter for 
> > /vvmn/sdku/AK_VVMN_T.GDF [Mon Feb 13 17:17:30 2006] [debug] 
> > mod_proxy_http.c(54): proxy: HTTP:
> > canonicalising URL //10.34.1.23/sdku/AK_VVMN_T.GDF
> 
> So I'm assuming this request was for a file that was already in the? 
Yes,  it is, file in cache.
> Then I'm not sure what is going on.  There is no indication 
> of why it isn't looking in the cache.

And what shall I do?

And another question about reverse proxy.

As far as I understand, mod_proxy (via mod_proxy_http) connects to remote
Web-server directly. Does it possible to force mod_proxy_http work through
another proxy server?

Airat


---------------------------------------------------------------------
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] Reverse proxy and cache

Posted by Joshua Slive <jo...@slive.ca>.
On 2/13/06, Airat A. Sadreev <sa...@szmn.ru> wrote:

> >
> Using Apache 2.2.0 (binary distribution from http://apachelounge.com/)
> Apache running on port 85
> client running on server machine (www-root.in, 10.10.1.2)
>
> Log file is
>
> [Mon Feb 13 17:17:30 2006] [debug] mod_cache.c(129): Adding CACHE_SAVE
> filter for /vvmn/sdku/AK_VVMN_T.GDF
> [Mon Feb 13 17:17:30 2006] [debug] mod_cache.c(136): Adding CACHE_REMOVE_URL
> filter for /vvmn/sdku/AK_VVMN_T.GDF
> [Mon Feb 13 17:17:30 2006] [debug] mod_proxy_http.c(54): proxy: HTTP:
> canonicalising URL //10.34.1.23/sdku/AK_VVMN_T.GDF

So I'm assuming this request was for a file that was already in the? 
Then I'm not sure what is going on.  There is no indication of why it
isn't looking in the cache.

Joshua.

---------------------------------------------------------------------
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] Reverse proxy and cache

Posted by "Airat A. Sadreev" <sa...@szmn.ru>.

> -----Original Message-----
> From: Joshua Slive [mailto:joshua@slive.ca]
> Sent: Monday, February 13, 2006 4:48 PM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] Reverse proxy and cache
>
> On 2/13/06, Садреев Айрат Алмазович
> <Sa...@kaz.transneft.ru> wrote:
> >
> >         I'd like to provide access to multiple remote
> Web-servers via my Apache using reverse proxy. Remote
> Web-servers connected via low-speed channels so I'd like to
> use caching to speed-up content loading for clients.
> >
> >         I set up reverse proxy and cache modules. The
> accessed files put into cache but download speed was not
> increased. It seems that files is reloaded every time when
> accessed and caching don't work actually.
> >
> >         This is an excerpt from my conf file
> >
> > <VirtualHost 10.10.1.2>
> >         ServerName www-root.in
> >
> >         CacheEnable disk /
> >         ProxyPass /vvmn/ http://10.34.1.23/
> >
> > </VirtualHost>
> >
> >
> >         Requested URLs looks like this
> http://www-root.in/vvmn/pics/035457.JPG
> >         10.34.1.23 - IP address of the remote server.
> >
> > What's wrong?
>
> Change LogLevel to debug and check the error log.  Apache
> follows normal http caching rules, so your response headers
> must look cachable.  Also, you should be using the most
> recent version if you want to work with mod_cache.
>
> Joshua.
>
Using Apache 2.2.0 (binary distribution from http://apachelounge.com/)
Apache running on port 85
client running on server machine (www-root.in, 10.10.1.2)

Log file is

[Mon Feb 13 17:17:30 2006] [debug] mod_cache.c(129): Adding CACHE_SAVE
filter for /vvmn/sdku/AK_VVMN_T.GDF
[Mon Feb 13 17:17:30 2006] [debug] mod_cache.c(136): Adding CACHE_REMOVE_URL
filter for /vvmn/sdku/AK_VVMN_T.GDF
[Mon Feb 13 17:17:30 2006] [debug] mod_proxy_http.c(54): proxy: HTTP:
canonicalising URL //10.34.1.23/sdku/AK_VVMN_T.GDF
[Mon Feb 13 17:17:30 2006] [debug] proxy_util.c(1373): [client 10.10.1.2]
proxy: http: found worker http://10.34.1.23/ for
http://10.34.1.23/sdku/AK_VVMN_T.GDF
[Mon Feb 13 17:17:30 2006] [debug] mod_proxy.c(736): Running scheme http
handler (attempt 0)
[Mon Feb 13 17:17:30 2006] [debug] mod_proxy_http.c(1661): proxy: HTTP:
serving URL http://10.34.1.23/sdku/AK_VVMN_T.GDF
[Mon Feb 13 17:17:30 2006] [debug] proxy_util.c(1754): proxy: HTTP: has
acquired connection for (10.34.1.23)
[Mon Feb 13 17:17:30 2006] [debug] proxy_util.c(1811): proxy: connecting
http://10.34.1.23/sdku/AK_VVMN_T.GDF to 10.34.1.23:80
[Mon Feb 13 17:17:30 2006] [debug] proxy_util.c(1911): proxy: connected
/sdku/AK_VVMN_T.GDF to 10.34.1.23:80
[Mon Feb 13 17:17:30 2006] [debug] proxy_util.c(2005): proxy: HTTP: fam 2
socket created to connect to 10.34.1.23
[Mon Feb 13 17:17:31 2006] [debug] proxy_util.c(2101): proxy: HTTP:
connection complete to 10.34.1.23:80 (10.34.1.23)
[Mon Feb 13 17:17:34 2006] [debug] mod_proxy_http.c(1443): proxy: start body
send
[Mon Feb 13 17:17:34 2006] [debug] mod_cache.c(602): cache: Caching url:
/vvmn/sdku/AK_VVMN_T.GDF
[Mon Feb 13 17:17:35 2006] [debug] mod_cache.c(608): cache: Removing
CACHE_REMOVE_URL filter.
[Mon Feb 13 17:17:35 2006] [debug] mod_disk_cache.c(954): disk_cache: Stored
headers for URL http://_default_:85/vvmn/sdku/AK_VVMN_T.GDF?
[Mon Feb 13 17:17:44 2006] [debug] mod_disk_cache.c(1035): disk_cache: Body
for URL http://_default_:85/vvmn/sdku/AK_VVMN_T.GDF? cached.
[Mon Feb 13 17:17:44 2006] [debug] mod_proxy_http.c(1530): proxy: end body
send
[Mon Feb 13 17:17:44 2006] [debug] proxy_util.c(1769): proxy: HTTP: has
released connection for (10.34.1.23)

Header from cache (file attached)

http://_default_:85/vvmn/sdku/AK_VVMN_T.GDF?Server: Microsoft-IIS/5.0
X-Powered-By: ASP.NET
Date: Mon, 13 Feb 2006 14:17:31 GMT
Content-Type: application/octet-stream
Accept-Ranges: bytes
Last-Modified: Wed, 18 Jan 2006 13:26:01 GMT
ETag: "8dbaabb9321cc61:d7b"
Content-Length: 319488
Expires: Tue, 14 Feb 2006 14:17:31 GMT

User-Agent: Wget/1.9-beta
Host: 10.10.1.2:85
Accept: */*
Max-Forwards: 10
X-Forwarded-For: 10.10.1.2
X-Forwarded-Host: 10.10.1.2:85
X-Forwarded-Server: www-root.in

Airat

Re: [users@httpd] Reverse proxy and cache

Posted by Joshua Slive <jo...@slive.ca>.
On 2/13/06, Садреев Айрат Алмазович <Sa...@kaz.transneft.ru> wrote:
>
>         I'd like to provide access to multiple remote Web-servers via my Apache using reverse proxy. Remote Web-servers connected via low-speed channels so I'd like to use caching to speed-up content loading for clients.
>
>         I set up reverse proxy and cache modules. The accessed files put into cache but download speed was not increased. It seems that files is reloaded every time when accessed and caching don't work actually.
>
>         This is an excerpt from my conf file
>
> <VirtualHost 10.10.1.2>
>         ServerName www-root.in
>
>         CacheEnable disk /
>         ProxyPass /vvmn/ http://10.34.1.23/
>
> </VirtualHost>
>
>
>         Requested URLs looks like this http://www-root.in/vvmn/pics/035457.JPG
>         10.34.1.23 - IP address of the remote server.
>
> What's wrong?

Change LogLevel to debug and check the error log.  Apache follows
normal http caching rules, so your response headers must look
cachable.  Also, you should be using the most recent version if you
want to work with mod_cache.

Joshua.