Welcome, Guest. Please login or register.
Did you miss your activation email?
Saturday 21 December 2024, 07:11:20 pm

Login with username, password and session length

Visit the Official Endian Bug tracker  HERE
14262 Posts in 4377 Topics by 6517 Members
Latest Member: Sandro
Search:     Advanced search
+  EFW Support
|-+  Support
| |-+  EFW SMTP, HTTP, SIP, FTP Proxy Support
| | |-+  Squid conf not being saved - SOLVED
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Squid conf not being saved - SOLVED  (Read 40430 times)
inteq
Full Member
***
Offline Offline

Posts: 12


« on: Sunday 24 May 2009, 09:39:59 am »

Hello,

I am a beginner in Endian, but so far I like it very much.
I have a problem with squid.conf contents being overwritten after restart or stop/start of Squid.
I have added some modifications for youtube and Co, after the first restart of Squid everything is OK, but when I check squid.conf, my modifications are not there anymore and of course, after a second reboot or service restart, the modifications and their results are lost.

Any clue why this is happening?

And another question (too keep the topic list short): any way to install MC on Endian?


Thank you very much
Logged
StephanSch
Full Member
***
Offline Offline

Gender: Male
Posts: 57


« Reply #1 on: Sunday 24 May 2009, 06:22:46 pm »

I think you have to write your changes to the /etc/squid/squid.conf.tmpl wich is the template for overwriting the squid.conf on restart.
Logged
inteq
Full Member
***
Offline Offline

Posts: 12


« Reply #2 on: Monday 25 May 2009, 09:02:35 am »

Tried that now. It does not work. The changes in squid.conf.tmp1 are saved after restart but they do not work as intended.
If the lines I want to add are added to squid.conf, it is working...but nothing is saved.

The lines I add are :
# Break HTTP standard for flash . Keep them in cache even if asked not to.
refresh_pattern -i \.flv$ 10080 90% 999999 ignore-no-cache override-expire ignore-private

# Apparently youtube.com use 'Range' requests
# - not seen, but presumably when a video is stopped for a long while then resumed, (or fast-forwarded).
# - convert range requests into a full-file request, so squid can cache it
# NP: BUT slows down their _first_ load time.
quick_abort_min -1 KB

# Also  are LARGE; make sure you aren't killing them as 'too big to save'
# - squid defaults to 4MB, which is too small for  and even some sound files
maximum_object_size 4 GB

# Let the clients favorite video site through with full caching
# - they can come from any of a number of youtube.com subdomains.
# - this is NOT ideal, the 'merging' of identical content is really needed here
acl youtube dstdomain .youtube.com
cache allow youtube

# Do all the above BEFORE blocking dynamic caching
# - Not required. Just recommended from general squid.conf
# kept to demonstrate that the above go before this.
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY


Any other idea?
Logged
StephanSch
Full Member
***
Offline Offline

Gender: Male
Posts: 57


« Reply #3 on: Tuesday 26 May 2009, 04:39:06 am »

I hope you used the .tmpl not .tmp1. If yes, did you try to restart the squid with the webinterface not with restartsquid and vice versa?

I think your

Quote
# Also  are LARGE; make sure you aren't killing them as 'too big to save'
# - squid defaults to 4MB, which is too small for  and even some sound files
maximum_object_size 4 GB

can be realized with the option "Max object size (KB) *" on Proxy --> Configuration --> Cache management.
Logged
inteq
Full Member
***
Offline Offline

Posts: 12


« Reply #4 on: Tuesday 26 May 2009, 08:32:24 am »

Thank you.
Indeed, my good eye (left one) played a trick on me, considering 1 = l (L )
Now I understand that squid.conf cannot be modified, but squid.conf.tmpl can
So, I modified it and now it is working like a dream.

For those who want to cache youtube content and more:

nano squid.conf.tmpl (located in /etc/squid)

search for a line like "acl QUERY urlpath_regex cgi-bin \?"

ABOVE this line insert the following (without the ---------)

---------------------------------

refresh_pattern -i \.flv$ 10080 90% 999999 ignore-no-cache override-expire ignore-private

quick_abort_min -1 KB

acl comdom dstdomain .com
acl netdom dstdomain .net
cache allow comdom
cache allow netdom

---------------------------

That is all.
Restart the proxy and the flv content from .com and .net sites and their subdomains will be cached and served from cache.
If you want to add extra domains add an ACL with let's say:
"acl orgdom dstdomain .org"
and a rule like:
"cache allow orgdom" (all without " " of course )

All the best





Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Page created in 0.078 seconds with 17 queries.
Powered by SMF 1.1 RC2 | SMF © 2001-2005, Lewis Media Design by 7dana.com