Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache as a proxy/cache

Status
Not open for further replies.

ukgrahams

Instructor
May 22, 2003
2
GB
I have set up apache on a Win 98 machine as a caching proxy, hoping to speed up access to sites by storing them locally. ( I have a 128k ISDN which for a school with over 100 PCs is hopelessly slow!)

I have successfully set up the proxy module which also accesses a remote proxy for filtering, however when more than 4 or 5 users access the same site there is no increase in access speed at all, as though the cache was not there. Could somebody check my conf file entries below and let me know if there is something I am doing wrong

Thanks

Load Module section:

LoadModule access_module modules/mod_access.so
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_module modules/mod_auth.so
#LoadModule auth_anon_module modules/mod_auth_anon.so
LoadModule auth_dbm_module modules/mod_auth_dbm.so
#LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule cache_module modules/mod_cache.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule cgi_module modules/mod_cgi.so
#LoadModule dav_module modules/mod_dav.so
#LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule dir_module modules/mod_dir.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule env_module modules/mod_env.so
#LoadModule expires_module modules/mod_expires.so
LoadModule file_cache_module modules/mod_file_cache.so
#LoadModule headers_module modules/mod_headers.so
LoadModule imap_module modules/mod_imap.so
LoadModule include_module modules/mod_include.so
#LoadModule info_module modules/mod_info.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule mime_module modules/mod_mime.so
#LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule negotiation_module modules/mod_negotiation.so
#LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
#LoadModule speling_module modules/mod_speling.so
#LoadModule status_module modules/mod_status.so
#LoadModule unique_id_module modules/mod_unique_id.so
LoadModule userdir_module modules/mod_userdir.so
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
#LoadModule ssl_module modules/mod_ssl.so

Proxy section

# Proxy Server directives. Uncomment the following lines to
# enable the proxy server:
#
<IfModule mod_proxy.c>
ProxyRequests On
ProxyRemote * remote proxy
#ProxyBlock
<Proxy *>
order allow,deny
allow from all
deny from none
AuthType Basic
AuthName &quot;192.168.100.254&quot;
AuthUserFile &quot;C:\Progra~1\Apache~1\Apache2\conf\users&quot;
require valid-user
</Proxy>

#
# Enable/disable the handling of HTTP/1.1 &quot;Via:&quot; headers.
# (&quot;Full&quot; adds the server version; &quot;Block&quot; removes all outgoing Via: headers)
# Set to one of: Off | On | Full | Block
#
ProxyVia On

#
# To enable the cache as well, edit and uncomment the following lines:
# (no cacheing without CacheRoot)
#
<IfModule mod_cache.c>
#LoadModule disk_cache_module modules/mod_disk_cache.so
<IfModule mod_disk_cache.c>
CacheRoot &quot;C:/Program Files/Apache Group/Apache2/proxy&quot;
CacheSize 10000000000
CacheEnable disk /
CacheDirLevels 5
CacheDirLength 2
</IfModule>

#LoadModule mem_cache_module modules/mod_mem_cache.so
<IfModule mod_mem_cache.c>
CacheEnable mem /
MCacheSize 128000
MCacheMaxObjectCount 100
MCacheMinObjectSize 1
MCacheMaxObjectSize 2048
</IfModule>
</IfModule>

</IfModule>
 
Why arent you loading the disk_cache_module ? you appear to have it commented out, you are loading the mem_cache_module further up in the config so thats ok to be commented here!

Try that for a start ..... Good Luck Laurie.

<IfModule mod_cache.c>
#LoadModule disk_cache_module modules/mod_disk_cache.so
<IfModule mod_disk_cache.c>
CacheRoot &quot;C:/Program Files/Apache Group/Apache2/proxy&quot;
CacheSize 10000000000
CacheEnable disk /
CacheDirLevels 5
CacheDirLength 2
</IfModule>

#LoadModule mem_cache_module modules/mod_mem_cache.so
<IfModule mod_mem_cache.c>
CacheEnable mem /
MCacheSize 128000
MCacheMaxObjectCount 100
MCacheMinObjectSize 1
MCacheMaxObjectSize 2048
</IfModule>
</IfModule>

</IfModule>
 
The disk cache module is only commented out in the proxy section - it is enabled higher up in the Load Module section.

Thanks anyway
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top