Hello,

at the beginning I would like to mention that I've already search for
the answer to my question, found similar topics, but none of them
helped me to completely solve my problem.

The thing is I have monitoring server with cgi scripted site on it.
The site fetches various data and generates charts 'on-the-fly'. Now
it is only available via HTTPS with htaccess-type authorization.

The bad thing is that it is quite often browsed and everytime it gets
HTTP requests, it has to generate all of the charts (quite a lot of
them) on the fly, which not only makes loading the page slow, but also
affects server's performance.

There 4 most important things about the site:
* index.cgi - checks current timestamps and generates proper GET
requests to generate images via gen.cgi
* gen.cgi - it receives paramers via GET from index.cgi and draws charts
* images ARE NOT files placed on server, but form of gen.cgi links
(e.g. "gen.cgi?icon,moni_sys_procs,1314022200,1,161.6,166.4,FFFFFF...")
* images generation links contain most up-to-date timestamp for every
certain image

What I want to do is to set another server in the middle, which would
run squid and act as a transparent, accelerating proxy. My main
problem is that squid doesn't want to cache anything at all. My goal
is to:

* cache index.cgi for max 1 minute time - since it provides important
data to generate charts
* somehow cache images generated on the fly as long, as there aren't
new one in index.cgi (only possible if timestamp has changed)

To make it simpler to develop, I've temporary disabled authorization,
so my config looks like:
#################################################################
http_port 5080 accel defaultsite=xxxx.pl ignore-cc

# HTTP peer
cache_peer 11.11.11.11 parent 5080 0 no-query originserver name=xxxx.pl

hierarchy_stoplist cgi-bin cgi ?

refresh_pattern (\.cgi|\?)    0       0%      0
refresh_pattern .               0       20%     4320

acl our_sites dstdomain xxxx.pl
http_access allow our_sites
cache_peer_access xxxx.pl allow our_sites
cache_peer_access xxxx.pl deny all
##################################################################

Unfortunately, access.log looks in this way:

1314022248.996     66 127.0.0.1 TCP_MISS/200 432 GET
http://xxxx.pl/gen.cgi? - FIRST_UP_PARENT/xxxx.pl image/png
1314022249.041     65 127.0.0.1 TCP_MISS/200 491 GET
http://xxxx.pl/gen.cgi? - FIRST_UP_PARENT/xxxx.pl image/png
1314022249.057     65 127.0.0.1 TCP_MISS/200 406 GET
http://xxxx.pl/gen.cgi? - FIRST_UP_PARENT/xxxx.pl image/png
1314022249.058     62 127.0.0.1 TCP_MISS/200 438 GET
http://xxxx.pl/gen.cgi? - FIRST_UP_PARENT/xxxx.pl image/png
1314022249.062     68 127.0.0.1 TCP_MISS/200 458 GET
http://xxxx.pl/gen.cgi? - FIRST_UP_PARENT/xxxx.pl image/png
1314022249.107     64 127.0.0.1 TCP_MISS/200 482 GET
http://xxxx.pl/gen.cgi? - FIRST_UP_PARENT/xxxx.pl image/png
1314022249.126     66 127.0.0.1 TCP_MISS/200 460 GET
http://xxxx.pl/gen.cgi? - FIRST_UP_PARENT/xxxx.pl image/png
1314022249.126     67 127.0.0.1 TCP_MISS/200 478 GET
http://xxxx.pl/gen.cgi? - FIRST_UP_PARENT/xxxx.pl image/png
1314022249.127     63 127.0.0.1 TCP_MISS/200 467 GET
http://xxxx.pl/gen.cgi? - FIRST_UP_PARENT/xxxx.pl image/png
1314022249.169     61 127.0.0.1 TCP_MISS/200 420 GET
http://xxxx.pl/gen.cgi? - FIRST_UP_PARENT/xxxx.pl image/png
1314022249.191     63 127.0.0.1 TCP_MISS/200 524 GET
http://xxxx.pl/gen.cgi? - FIRST_UP_PARENT/xxxx.pl image/png
1314022249.193     66 127.0.0.1 TCP_MISS/200 421 GET
http://xxxx.pl/gen.cgi? - FIRST_UP_PARENT/xxxx.pl image/png
1314022249.197     69 127.0.0.1 TCP_MISS/200 530 GET
http://xxxx.pl/gen.cgi? - FIRST_UP_PARENT/xxxx.pl image/png


Could someone tell me how to configure squid to meet my expactations?
I will be so much grateful for any help.

Best regards,
Mateusz

-- 
[ Mateusz 'Blaster' Buc :: blas...@grex.org :: http://blast3r.info ]
[ There's no place like 127.0.0.1. :: +48 724676983 :: GG: 2937287 ]

Reply via email to