User Tools

Site Tools


apache:forward_proxy

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
apache:forward_proxy [2016/05/22 09:43] cbrediapache:forward_proxy [2016/05/24 07:29] cbredi
Line 2: Line 2:
  
 Creates a forward proxy ([[http://www.squid-cache.org|squid]] drop in replacement) on TCP port 3128. Creates a forward proxy ([[http://www.squid-cache.org|squid]] drop in replacement) on TCP port 3128.
-Proved to be faster than squid 3.5 on the same hardware.+Proved to be faster than squid 3.5 on the same hardware when using Apache httpd [[https://httpd.apache.org/docs/2.4/mod/event.html|event MPM]].
  
 Make sure you have a local DNS caching resolver, such as [[https://www.unbound.net|unbound]] or [[https://www.powerdns.com/recursor.html|PowerDNS Recursor]] configured in /etc/resolv.conf. Make sure you have a local DNS caching resolver, such as [[https://www.unbound.net|unbound]] or [[https://www.powerdns.com/recursor.html|PowerDNS Recursor]] configured in /etc/resolv.conf.
Line 8: Line 8:
 ProxyDomain directive protects the proxy from accessing domain hosts by filling up the local domain name or search domains from /etc/resolv.conf. ProxyDomain directive protects the proxy from accessing domain hosts by filling up the local domain name or search domains from /etc/resolv.conf.
  
-Apache httpd [[https://httpd.apache.org/docs/2.4/mod/mod_reqtimeout.html|mod_reqtimeout]] drops some long lived https connections in its default configuration (RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500) +Apache httpd [[https://httpd.apache.org/docs/2.4/mod/mod_reqtimeout.html|mod_reqtimeout]] drops some long lived https connections in its default configuration (RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500).
- +
-No caching is performed in this setup but it can be implemented using httpd [[https://httpd.apache.org/docs/current/mod/mod_cache.html|mod_cache]] and [[https://httpd.apache.org/docs/current/mod/mod_cache_disk.html|mod_cache_disk]].+
  
 Required modules: [[https://httpd.apache.org/docs/current/mod/mod_proxy.html|mod_proxy]], [[https://httpd.apache.org/docs/current/mod/mod_proxy_connect.html|mod_proxy_connect]]. Required modules: [[https://httpd.apache.org/docs/current/mod/mod_proxy.html|mod_proxy]], [[https://httpd.apache.org/docs/current/mod/mod_proxy_connect.html|mod_proxy_connect]].
Line 30: Line 28:
                 Require ip 172.16.0.0/12                 Require ip 172.16.0.0/12
         </Proxy>         </Proxy>
 +</VirtualHost>
 +</code>
 +
 +No caching is performed in this setup but it can be implemented using httpd [[https://httpd.apache.org/docs/current/mod/mod_cache.html|mod_cache]] and [[https://httpd.apache.org/docs/current/mod/mod_cache_disk.html|mod_cache_disk]].
 +
 +To enable disk caching:
 +
 +<code>
 +<VirtualHost>
 +...
 +        <IfModule mod_cache_disk.c>
 +                CacheRoot "/var/spool/httpd"
 +                CacheEnable disk http://
 +                CacheEnable disk ftp://
 +        </IfModule>
 +...
 </VirtualHost> </VirtualHost>
 </code> </code>
apache/forward_proxy.txt · Last modified: 2018/04/08 11:59 by cbredi