LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-17-2006, 03:30 PM   #1
wwnexc
Member
 
Registered: Sep 2005
Location: California
Distribution: Slackware & Debian
Posts: 264

Rep: Reputation: 30
Cool Apache Proxy: Cache JPGs and others


Hi,

I have just installed apache and I am intending to run it as a forwarding proxy, to speed up the internet connection by caching common queries.

So far it works great, and after doing some speed tests to see if it works, i was impressed: the first time i tried to access a page, the speed was just as normal. When i accessed the same page on another computer later, it appeared within a few milliseconds. (http://performance.toast.net, text test)

The results for the JPG was not so great. It did not improve at all, even thought the JPG was long within the limits of the cache size. I believe that it should have been cached. It didn't, and I have not yet been able to find out why.

Here is my proxy configuration
Code:
<Proxy *>

Order deny,allow
Deny from all
Allow from 192.168.1.0/255.255.255.0

</Proxy> 



CacheEnable disk *
CacheEnable mem *.htm*


LoadModule cache_module modules/mod_cache.so

<IfModule mod_cache.c>

LoadModule disk_cache_module modules/mod_disk_cache.so

<IfModule mod_disk_cache.c>

CacheRoot /cacheroot
CacheDirLevels 6
CacheDirLength 3
CacheMinFileSize 1
CacheMaxFileSize 10000000

</IfModule> 

LoadModule mem_cache_module modules/mod_mem_cache.so

<IfModule mod_mem_cache.c>

MCacheSize 65536
MCacheMaxObjectCount 1048576
MCacheMinObjectSize 1
MCacheMaxObjectSize 2097152

</IfModule>

# When acting as a proxy, don't cache the list of security updates
# CacheDisable http://security.update.server/update-list/

</IfModule>
I used the example on apache's website, and changed it slightly, the way i thought it would fit my needs. It seems to work, but it doesn't like pictures or other downloads.

Can you please tell me how i can get apache to cache graphics and other files?

Thank You

Last edited by wwnexc; 06-17-2006 at 03:32 PM.
 
Old 06-18-2006, 08:40 AM   #2
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Quote:
Originally Posted by wwnexc
I have just installed apache and I am intending to run it as a forwarding proxy, to speed up the internet connection by caching common queries.
Unfortunately I do not know the answer to your Apache question. I just wanted to point out "Squid" to you. Squid is a caching proxy, designed to do exactly what you are describing. Apache is a webserver, with some caching abilities. Squid may be better suited to the job - you might want to check it out and compare its capabilities to Apache.
 
Old 06-18-2006, 02:02 PM   #3
wwnexc
Member
 
Registered: Sep 2005
Location: California
Distribution: Slackware & Debian
Posts: 264

Original Poster
Rep: Reputation: 30
Actionally, I do have Squid installed and running. I just want to compare the performance of the two, before i decide on which server to use in the long run.

By the way: I did not get Squid to chache images and other downloads either. If you could tell me how to do that i would be very thankful too.

Last edited by wwnexc; 06-18-2006 at 02:21 PM.
 
Old 06-18-2006, 06:44 PM   #4
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Quote:
Originally Posted by wwnexc
I did not get Squid to chache images and other downloads either. If you could tell me how to do that i would be very thankful too.
I have just recently installed Squid on my home computer. So I still don't know much about it. I have it specifically set to NOT cache anything, ever. I want Squid not for the caching, but for the ACL control of who gets to go where. I'm using SquidGuard as a Squid redirector to accomplish this. I'm still in the experimental phase. I wish I could help you more, but I'm just learning it myself!
 
Old 06-18-2006, 07:29 PM   #5
wwnexc
Member
 
Registered: Sep 2005
Location: California
Distribution: Slackware & Debian
Posts: 264

Original Poster
Rep: Reputation: 30
Yeah, me too. I am still in the learning phase. I came from windows originally, and i still have some linux leaning to do. I still don't know everything in linux as i do with windows. I know it is partially sad, but i think that i am moving toward the right direction. ;-)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
clearing cache on squid proxy shadowsurfer Linux - Newbie 9 04-15-2008 11:33 PM
routing, firewall, cache proxy tutorial kpachopoulos Linux - General 4 09-01-2005 03:16 AM
Squid Reverse Proxy Cache Question Gentoo20 Linux - Networking 0 02-04-2005 01:19 PM
Proxy/cache and dial on demand (from a newbie) electoneel90 Linux - Networking 2 02-13-2004 02:22 PM
Mandrake 9.2 or RH 9? which is best for a proxy/cache/NAT box debloxie Linux - Distributions 1 01-16-2004 10:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration