Hi all,
i'm trying to use apache httpd as a forward proxy (named "httpd-proxy"
below ) with cache content
user (me) => httpd-proxy => target_proxy:9999
i test this with:
chromium --proxy-server=httpd-proxy:80
*it work, i can browse the web,* *but there is no cache at all*, httpd is
in debug mode, there is no reference to any cache ( it's very verbose about
the proxy part so i know the debug + the forward proxy actually work
Apache/2.4.54 (Unix)
debian 11
in my acces log:
86.164.123.129 - - - [24/Jan/2023:16:24:30 +0100] "CONNECT
fonts.gstatic.com:443 HTTP/1.1" 200
86.164.123.129 - - - [24/Jan/2023:16:24:33 +0100] "CONNECT
i.stack.imgur.com:443 HTTP/1.1" 200
86.164.123.129 - - - [24/Jan/2023:16:24:33 +0100] "CONNECT
i.stack.imgur.com:443 HTTP/1.1" 200
syslog:
Jan 24 16:25:43 httpd-proxy httpd[10589]: [proxy:debug] [pid 10589]
mod_proxy.c(1503): [client 86.164.123.129:29806] AH01143: Running scheme
cdn.cookielaw.org handler (attempt 0)
Jan 24 16:25:43 httpd-proxy httpd[10589]: [proxy_http:debug] [pid 10589]
mod_proxy_http.c(1870): [client 86.164.123.129:29806] AH01113: HTTP:
declining URL cdn.cookielaw.org:443
Jan 24 16:25:43 httpd-proxy httpd[10589]: [proxy_connect:debug] [pid 10589]
mod_proxy_connect.c(196): [client 86.164.123.129:29806] AH01019: connecting
cdn.cookielaw.org:443 to cdn.cookielaw.org:443
Jan 24 16:25:44 httpd-proxy httpd[10581]: [core:debug] [pid 10581]
vhost.c(1188): [client 86.164.123.129:28313] AH02417: Replacing host header
'cdn.cookielaw.org:443' with host 'cdn.cookielaw.org:443' given in the
request uri
Jan 24 16:25:44 httpd-proxy httpd[10581]: [authz_core:debug] [pid 10581]
mod_authz_core.c(843): [client 86.164.123.129:28313] AH01628: authorization
result: granted (no directives)
Jan 24 16:25:44 httpd-proxy httpd[10581]: [proxy:debug] [pid 10581]
mod_proxy.c(1503): [client 86.164.123.129:28313] AH01143: Running scheme
cdn.cookielaw.org handler (attempt 0)
Jan 24 16:25:44 httpd-proxy httpd[10581]: [proxy_http:debug] [pid 10581]
mod_proxy_http.c(1870): [client 86.164.123.129:28313] AH01113: HTTP:
declining URL cdn.cookielaw.org:443
Jan 24 16:25:44 httpd-proxy httpd[10581]: [proxy_connect:debug] [pid 10581]
mod_proxy_connect.c(196): [client 86.164.123.129:28313] AH01019: connecting
cdn.cookielaw.org:443 to cdn.cookielaw.org:443
mkdir -p /var/cache/apache2/mod_cache_disk/
mkdir -p /var/cache/apache2/mod_cache_lock/
chown -R web: /var/cache/apache2/mod_cache_* #apache is running under
"web" user
here is the config for "httpd-proxy"
LoadModule cache_module modules/mod_cache.so
LoadModule cache_disk_module modules/mod_cache_disk.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule ssl_module modules/mod_ssl.so
CacheEnable disk /
#tried this suggestion from serverfault.com, any input on this ?
#CacheEnable disk http://
CacheRoot /var/cache/apache2/mod_cache_disk/
CacheQuickHandler off
CacheLock on
CacheLockPath /var/cache/apache2/mod_cache_lock/
CacheLockMaxAge 5
CacheHeader On
CacheDetailHeader On
CacheStoreExpired On
CacheStoreNoStore On
CacheIgnoreNoLastMod On
CacheIgnoreCacheControl On
LogLevel debug
LogFormat "%h %{cache-status}e %l %u %t \"%r\" %>s " common
CustomLog "|/usr/bin/logger -p local1.info -t access_log" common
ErrorLog syslog
Header unset Expires
Header unset Cache-Control
Header unset Pragma
ExpiresActive On
ExpiresByType text/html "access plus 1 years"
ExpiresByType image/png "access plus 1 years"
ExpiresByType application/javascript "access plus 1 years"
ProxyRequests On
SSLProxyEngine On
SSLProxyVerify none
SSLVerifyClient none
SSLProxyProtocol TLSv1.2
SSLProxyCheckPeerName off
SSLProxyCACertificateFile /usr/local/share/ca-certificates/ca.crt
SSLVerifyDepth 10
ProxyPass / http://target_proxy:9999/
ProxyPassReverse / http://target_proxy:9999/
thanks for any help
i'm trying to use apache httpd as a forward proxy (named "httpd-proxy"
below ) with cache content
user (me) => httpd-proxy => target_proxy:9999
i test this with:
chromium --proxy-server=httpd-proxy:80
*it work, i can browse the web,* *but there is no cache at all*, httpd is
in debug mode, there is no reference to any cache ( it's very verbose about
the proxy part so i know the debug + the forward proxy actually work
Apache/2.4.54 (Unix)
debian 11
in my acces log:
86.164.123.129 - - - [24/Jan/2023:16:24:30 +0100] "CONNECT
fonts.gstatic.com:443 HTTP/1.1" 200
86.164.123.129 - - - [24/Jan/2023:16:24:33 +0100] "CONNECT
i.stack.imgur.com:443 HTTP/1.1" 200
86.164.123.129 - - - [24/Jan/2023:16:24:33 +0100] "CONNECT
i.stack.imgur.com:443 HTTP/1.1" 200
syslog:
Jan 24 16:25:43 httpd-proxy httpd[10589]: [proxy:debug] [pid 10589]
mod_proxy.c(1503): [client 86.164.123.129:29806] AH01143: Running scheme
cdn.cookielaw.org handler (attempt 0)
Jan 24 16:25:43 httpd-proxy httpd[10589]: [proxy_http:debug] [pid 10589]
mod_proxy_http.c(1870): [client 86.164.123.129:29806] AH01113: HTTP:
declining URL cdn.cookielaw.org:443
Jan 24 16:25:43 httpd-proxy httpd[10589]: [proxy_connect:debug] [pid 10589]
mod_proxy_connect.c(196): [client 86.164.123.129:29806] AH01019: connecting
cdn.cookielaw.org:443 to cdn.cookielaw.org:443
Jan 24 16:25:44 httpd-proxy httpd[10581]: [core:debug] [pid 10581]
vhost.c(1188): [client 86.164.123.129:28313] AH02417: Replacing host header
'cdn.cookielaw.org:443' with host 'cdn.cookielaw.org:443' given in the
request uri
Jan 24 16:25:44 httpd-proxy httpd[10581]: [authz_core:debug] [pid 10581]
mod_authz_core.c(843): [client 86.164.123.129:28313] AH01628: authorization
result: granted (no directives)
Jan 24 16:25:44 httpd-proxy httpd[10581]: [proxy:debug] [pid 10581]
mod_proxy.c(1503): [client 86.164.123.129:28313] AH01143: Running scheme
cdn.cookielaw.org handler (attempt 0)
Jan 24 16:25:44 httpd-proxy httpd[10581]: [proxy_http:debug] [pid 10581]
mod_proxy_http.c(1870): [client 86.164.123.129:28313] AH01113: HTTP:
declining URL cdn.cookielaw.org:443
Jan 24 16:25:44 httpd-proxy httpd[10581]: [proxy_connect:debug] [pid 10581]
mod_proxy_connect.c(196): [client 86.164.123.129:28313] AH01019: connecting
cdn.cookielaw.org:443 to cdn.cookielaw.org:443
mkdir -p /var/cache/apache2/mod_cache_disk/
mkdir -p /var/cache/apache2/mod_cache_lock/
chown -R web: /var/cache/apache2/mod_cache_* #apache is running under
"web" user
here is the config for "httpd-proxy"
LoadModule cache_module modules/mod_cache.so
LoadModule cache_disk_module modules/mod_cache_disk.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule ssl_module modules/mod_ssl.so
CacheEnable disk /
#tried this suggestion from serverfault.com, any input on this ?
#CacheEnable disk http://
CacheRoot /var/cache/apache2/mod_cache_disk/
CacheQuickHandler off
CacheLock on
CacheLockPath /var/cache/apache2/mod_cache_lock/
CacheLockMaxAge 5
CacheHeader On
CacheDetailHeader On
CacheStoreExpired On
CacheStoreNoStore On
CacheIgnoreNoLastMod On
CacheIgnoreCacheControl On
LogLevel debug
LogFormat "%h %{cache-status}e %l %u %t \"%r\" %>s " common
CustomLog "|/usr/bin/logger -p local1.info -t access_log" common
ErrorLog syslog
Header unset Expires
Header unset Cache-Control
Header unset Pragma
ExpiresActive On
ExpiresByType text/html "access plus 1 years"
ExpiresByType image/png "access plus 1 years"
ExpiresByType application/javascript "access plus 1 years"
ProxyRequests On
SSLProxyEngine On
SSLProxyVerify none
SSLVerifyClient none
SSLProxyProtocol TLSv1.2
SSLProxyCheckPeerName off
SSLProxyCACertificateFile /usr/local/share/ca-certificates/ca.crt
SSLVerifyDepth 10
ProxyPass / http://target_proxy:9999/
ProxyPassReverse / http://target_proxy:9999/
thanks for any help