You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Juergen Daubert <ju...@jue.li> on 2012/03/01 12:34:22 UTC

[users@httpd] apache 2.4.1, regression, caching forward proxy configuration

Hello,

I'm using apache, instead of squid, as a caching forwarding proxy 
for my intranet. 

I've converted my old 2.2 configuration to 2.4, see below. The 
proxy part is still working fine, but caching to disk doesn't work
anymore. 

Nothing is written into the CacheRoot, no errors in the logs.


Any ideas or suggestions?

Thanks
Juergen


My httpd.conf follows:


Listen 192.168.0.95:8123

LoadModule authz_host_module lib/apache/mod_authz_host.so
LoadModule authz_core_module lib/apache/mod_authz_core.so
LoadModule cache_module lib/apache/mod_cache.so
LoadModule cache_disk_module lib/apache/mod_cache_disk.so
LoadModule log_config_module lib/apache/mod_log_config.so
LoadModule proxy_module lib/apache/mod_proxy.so
LoadModule proxy_connect_module lib/apache/mod_proxy_connect.so
LoadModule proxy_ftp_module lib/apache/mod_proxy_ftp.so
LoadModule proxy_http_module lib/apache/mod_proxy_http.so
LoadModule mpm_worker_module lib/apache/mod_mpm_worker.so
LoadModule unixd_module lib/apache/mod_unixd.so
LoadModule status_module lib/apache/mod_status.so
LoadModule info_module lib/apache/mod_info.so

User www
Group www

<Directory />
    AllowOverride none
    Require all denied
</Directory>

ErrorLog  "/var/log/apache/proxy_error_log"
LogLevel info
LogFormat "%h %l %u %t \"%r\" %>s %b" common
CustomLog "/var/log/apache/proxy_access_log" common

ProxyRequests On
<Proxy *>
   Require ip 192.168.0
</Proxy> 

CacheEnable disk / 
CacheRoot "/dat/sys/apache/cache/"
CacheDirLevels 2
CacheDirLength 1
CacheMaxFileSize 70000000
CacheMinFileSize 1

EnableSendfile On

ExtendedStatus On
ProxyStatus On

<Location /server-status>
    SetHandler server-status
    Require ip 192.168.0
</Location>

<Location /server-info>
    SetHandler server-info
    Require ip 192.168.0
</Location>



---------------------------------------------------------------------
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] apache 2.4.1, regression, caching forward proxy configuration

Posted by "Rapp, James" <ja...@sap.com>.
> >The strange thing is that everything works with apache 2.2.x, so
> >my guess is that there are either new but undocumented configuration
> >switches or we have a regression in 2.4.1.
> >BTW, I've found another report for probably the same issue, see [1].
> 
> >[1] http://article.gmane.org/gmane.comp.apache.user/98771

This slightly dated thread mentions the check-in for the realigned naming convention:

http://old.nabble.com/mod_disk_cache--%3E-mod_cache_disk-td29963400.html

I wonder if anyone confirmed Graham's work as requested?


-----Original Message-----
From: Juergen Daubert [mailto:jue@jue.li] 
Sent: Monday, March 05, 2012 8:41 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] apache 2.4.1, regression, caching forward proxy configuration

On Sat, Mar 03, 2012 at 06:06:51PM +0100, Rainer Jung wrote:
> On 01.03.2012 17:19, Juergen Daubert wrote:
> >On Thu, Mar 01, 2012 at 03:38:10PM +0000, Nick Kew wrote:
> >>On Thu, 1 Mar 2012 12:34:22 +0100
> >>Juergen Daubert<ju...@jue.li>  wrote:
> >>
> >>>Any ideas or suggestions?
> >>
> >>Set Loglevel to debug, or if necessary high-level trace,
> >>for the relevant modules.
> >
> >Thanks for the hint but I've tried that already, with no result.
> >
> >Even with a
> >
> >LogLevel cache:trace8
> >LogLevel cache_disk:trace8
> >
> >there's nothing in the logfile. To verify the syntax I've done the
> >same for the proxy module with proxy:trace8 which works, meaning a
> >lot of traces in the logfile.
> >
> >The strange thing is that everything works with apache 2.2.x, so
> >my guess is that there are either new but undocumented configuration
> >switches or we have a regression in 2.4.1.
> >BTW, I've found another report for probably the same issue, see [1].
> 
> >[1] http://article.gmane.org/gmane.comp.apache.user/98771
> 
> Could it be some VHost config merging thing? Cache defined in the
> main server, but requests handled in some VHost? I don't have much
> experience with mod_cache, but I vaguely remember some VHost config
> support being added or improved in 2.4.

No, there are no VHosts defined at all. See the configuration in my
initial posting. 

> Double check, that your rquests are actually handled by the global
> server and if not, copy or moce the cache config to the correct
> VHost and retest.

To exclude an error in that region I've created a VHost setup 
which includes the proxy and cache defines, but without success. 
The problem is still the same: proxy works, caching to disk doesn't 
work. 


Thanks and regards
Juergen


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] apache 2.4.1, regression, caching forward proxy configuration

Posted by Juergen Daubert <ju...@jue.li>.
On Sat, Mar 03, 2012 at 06:06:51PM +0100, Rainer Jung wrote:
> On 01.03.2012 17:19, Juergen Daubert wrote:
> >On Thu, Mar 01, 2012 at 03:38:10PM +0000, Nick Kew wrote:
> >>On Thu, 1 Mar 2012 12:34:22 +0100
> >>Juergen Daubert<ju...@jue.li>  wrote:
> >>
> >>>Any ideas or suggestions?
> >>
> >>Set Loglevel to debug, or if necessary high-level trace,
> >>for the relevant modules.
> >
> >Thanks for the hint but I've tried that already, with no result.
> >
> >Even with a
> >
> >LogLevel cache:trace8
> >LogLevel cache_disk:trace8
> >
> >there's nothing in the logfile. To verify the syntax I've done the
> >same for the proxy module with proxy:trace8 which works, meaning a
> >lot of traces in the logfile.
> >
> >The strange thing is that everything works with apache 2.2.x, so
> >my guess is that there are either new but undocumented configuration
> >switches or we have a regression in 2.4.1.
> >BTW, I've found another report for probably the same issue, see [1].
> 
> >[1] http://article.gmane.org/gmane.comp.apache.user/98771
> 
> Could it be some VHost config merging thing? Cache defined in the
> main server, but requests handled in some VHost? I don't have much
> experience with mod_cache, but I vaguely remember some VHost config
> support being added or improved in 2.4.

No, there are no VHosts defined at all. See the configuration in my
initial posting. 

> Double check, that your rquests are actually handled by the global
> server and if not, copy or moce the cache config to the correct
> VHost and retest.

To exclude an error in that region I've created a VHost setup 
which includes the proxy and cache defines, but without success. 
The problem is still the same: proxy works, caching to disk doesn't 
work. 


Thanks and regards
Juergen


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] apache 2.4.1, regression, caching forward proxy configuration

Posted by Rainer Jung <ra...@kippdata.de>.
On 01.03.2012 17:19, Juergen Daubert wrote:
> On Thu, Mar 01, 2012 at 03:38:10PM +0000, Nick Kew wrote:
>> On Thu, 1 Mar 2012 12:34:22 +0100
>> Juergen Daubert<ju...@jue.li>  wrote:
>>
>>> Any ideas or suggestions?
>>
>> Set Loglevel to debug, or if necessary high-level trace,
>> for the relevant modules.
>
> Thanks for the hint but I've tried that already, with no result.
>
> Even with a
>
> LogLevel cache:trace8
> LogLevel cache_disk:trace8
>
> there's nothing in the logfile. To verify the syntax I've done the
> same for the proxy module with proxy:trace8 which works, meaning a
> lot of traces in the logfile.
>
> The strange thing is that everything works with apache 2.2.x, so
> my guess is that there are either new but undocumented configuration
> switches or we have a regression in 2.4.1.
> BTW, I've found another report for probably the same issue, see [1].

> [1] http://article.gmane.org/gmane.comp.apache.user/98771

Could it be some VHost config merging thing? Cache defined in the main 
server, but requests handled in some VHost? I don't have much experience 
with mod_cache, but I vaguely remember some VHost config support being 
added or improved in 2.4.

Double check, that your rquests are actually handled by the global 
server and if not, copy or moce the cache config to the correct VHost 
and retest.

HTH

Rainer


---------------------------------------------------------------------
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] apache 2.4.1, regression, caching forward proxy configuration

Posted by "Rapp, James" <ja...@sap.com>.
> > Any ideas or suggestions?

Try the cache status logging added in 2.4:

http://httpd.apache.org/docs/2.4/mod/mod_cache.html#status

This worked for me in one of the older pre-release versions (2.3) but I admit I have not yet configured with 2.4.

Jim

-----Original Message-----
From: Juergen Daubert [mailto:jue@jue.li] 
Sent: Thursday, March 01, 2012 9:20 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] apache 2.4.1, regression, caching forward proxy configuration

On Thu, Mar 01, 2012 at 03:38:10PM +0000, Nick Kew wrote:
> On Thu, 1 Mar 2012 12:34:22 +0100
> Juergen Daubert <ju...@jue.li> wrote:
> 
> > Any ideas or suggestions?
> 
> Set Loglevel to debug, or if necessary high-level trace,
> for the relevant modules.

Thanks for the hint but I've tried that already, with no result.

Even with a 

LogLevel cache:trace8
LogLevel cache_disk:trace8

there's nothing in the logfile. To verify the syntax I've done the 
same for the proxy module with proxy:trace8 which works, meaning a 
lot of traces in the logfile.

The strange thing is that everything works with apache 2.2.x, so
my guess is that there are either new but undocumented configuration
switches or we have a regression in 2.4.1. 
BTW, I've found another report for probably the same issue, see [1].


Thanks and regards
Juergen

[1] http://article.gmane.org/gmane.comp.apache.user/98771


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


---------------------------------------------------------------------
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] apache 2.4.1, regression, caching forward proxy configuration

Posted by Juergen Daubert <ju...@jue.li>.
On Thu, Mar 01, 2012 at 03:38:10PM +0000, Nick Kew wrote:
> On Thu, 1 Mar 2012 12:34:22 +0100
> Juergen Daubert <ju...@jue.li> wrote:
> 
> > Any ideas or suggestions?
> 
> Set Loglevel to debug, or if necessary high-level trace,
> for the relevant modules.

Thanks for the hint but I've tried that already, with no result.

Even with a 

LogLevel cache:trace8
LogLevel cache_disk:trace8

there's nothing in the logfile. To verify the syntax I've done the 
same for the proxy module with proxy:trace8 which works, meaning a 
lot of traces in the logfile.

The strange thing is that everything works with apache 2.2.x, so
my guess is that there are either new but undocumented configuration
switches or we have a regression in 2.4.1. 
BTW, I've found another report for probably the same issue, see [1].


Thanks and regards
Juergen

[1] http://article.gmane.org/gmane.comp.apache.user/98771


---------------------------------------------------------------------
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] apache 2.4.1, regression, caching forward proxy configuration

Posted by Nick Kew <ni...@webthing.com>.
On Thu, 1 Mar 2012 12:34:22 +0100
Juergen Daubert <ju...@jue.li> wrote:

> Any ideas or suggestions?

Set Loglevel to debug, or if necessary high-level trace,
for the relevant modules.

-- 
Nick Kew

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