You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Petr Gajdos <pg...@suse.cz> on 2017/02/20 11:24:43 UTC

[users@httpd] forward proxy cache, 2.4.25

Hi,

perhaps just a theoretical question. I have an example:

---- httpd.conf --------------
ServerName test
User pgajdos
Group users
Listen 60080
PidFile /tmp/apache-rex/mod_proxy-cache/pid
ErrorLog /tmp/apache-rex/mod_proxy-cache/error_log
LoadModule auth_basic_module /usr/lib64/apache2-prefork/mod_auth_basic.so
LoadModule dir_module /usr/lib64/apache2-prefork/mod_dir.so
LoadModule authz_host_module /usr/lib64/apache2-prefork/mod_authz_host.so
LoadModule proxy_module /usr/lib64/apache2-prefork/mod_proxy.so
LoadModule proxy_http_module /usr/lib64/apache2-prefork/mod_proxy_http.so
LoadModule cache_module /usr/lib64/apache2-prefork/mod_cache.so
LoadModule log_config_module /usr/lib64/apache2-prefork/mod_log_config.so
LoadModule authz_core_module /usr/lib64/apache2-prefork/mod_authz_core.so
LoadModule cache_socache_module /usr/lib64/apache2-prefork/mod_cache_socache.so
LoadModule socache_shmcb_module /usr/lib64/apache2-prefork/mod_socache_shmcb.so
DocumentRoot /tmp/apache-rex/mod_proxy-cache/htdocs
DirectoryIndex index.html

### example configuration

LogFormat "%s %{cache-status}e" cache_format

Listen 60081
<VirtualHost *:60081>
  ErrorLog "/tmp/apache-rex/mod_proxy-cache/error_log-backend"
  DocumentRoot "/tmp/apache-rex/mod_proxy-cache/htdocs-backend"
  <Directory "/tmp/apache-rex/mod_proxy-cache/htdocs-backend">
    Require local
  </Directory>
</VirtualHost>

Listen 60082
<VirtualHost *:60082>
  ErrorLog "/tmp/apache-rex/mod_proxy-cache/error_log-reverse-proxy"

  <Location "/app/">
    ProxyPass "http://localhost:60081/"
  </Location>

  CacheSocache shmcb
  CacheSocacheMaxSize 102400
  CacheEnable socache "/"

  CacheHeader on

  CustomLog "/tmp/apache-rex/mod_proxy-cache/reverse-proxy-uncached.log" cache_format env=cache-miss
  CustomLog "/tmp/apache-rex/mod_proxy-cache/reverse-proxy-cached.log" cache_format env=cache-hit
  CustomLog "/tmp/apache-rex/mod_proxy-cache/reverse-proxy-revalidated.log" cache_format env=cache-revalidate
</VirtualHost>

Listen 60083
<VirtualHost *:60083>
  ErrorLog "/tmp/apache-rex/mod_proxy-cache/error_log-forward-proxy"
  LogLevel trace8

  ProxyRequests On
  <Proxy "*">
    Require local
  </Proxy>

  CacheSocache shmcb
  CacheSocacheMaxSize 102400
  # http://httpd.apache.org/docs/current/mod/mod_cache.html#cacheenable
  CacheEnable socache http://localhost:60081/

  CacheHeader on

  CustomLog "/tmp/apache-rex/mod_proxy-cache/forward-proxy-uncached.log" cache_format env=cache-miss
  CustomLog "/tmp/apache-rex/mod_proxy-cache/forward-proxy-cached.log" cache_format env=cache-hit
  CustomLog "/tmp/apache-rex/mod_proxy-cache/forward-proxy-revalidated.log" cache_format env=cache-revalidate
</VirtualHost>
--------------------

While the behavior for reverse proxy is not changed, I get a
difference for forward proxy between 2.4.23 and 2.4.25: for 2.4.25, I
get no X-Cache header and also no reference to mod_cache in error_log
for trace8.

Where I am wrong?

Petr

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


Re: [users@httpd] forward proxy cache, 2.4.25

Posted by Petr Gajdos <pg...@suse.cz>.
On Mon, Feb 20, 2017 at 10:28:26PM +0100, Yann Ylavic wrote:
> https://bz.apache.org/bugzilla/show_bug.cgi?id=60577
> 
> I just proposed a (new) patch there, could you test it and report back?

Ah, I really should have given search engine of the bugzilla a
chance.

Commented there.

Thanks!

Petr


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


Re: [users@httpd] forward proxy cache, 2.4.25

Posted by Yann Ylavic <yl...@gmail.com>.
On Mon, Feb 20, 2017 at 12:24 PM, Petr Gajdos <pg...@suse.cz> wrote:
>
> While the behavior for reverse proxy is not changed, I get a
> difference for forward proxy between 2.4.23 and 2.4.25: for 2.4.25, I
> get no X-Cache header and also no reference to mod_cache in error_log
> for trace8.
>
> Where I am wrong?

You are likely hitting this issue:
https://bz.apache.org/bugzilla/show_bug.cgi?id=60577

I just proposed a (new) patch there, could you test it and report back?


Regards,
Yann.

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