1 |
Am 31.05.2011 19:36, schrieb Pandu Poluan: |
2 |
> Hello! |
3 |
> |
4 |
> I've been having problems with my Squid-equipped Gentoo box: For some |
5 |
> sites, Squid just times out. But if I access the sites directly, they |
6 |
> appear in my browser. And doing a direct wget from the Squidbox also |
7 |
> works. |
8 |
> |
9 |
> Now I'm not sure whose 'fault' it is, but just in case it's Squid's, |
10 |
> I'll experiment with other web proxies. |
11 |
> |
12 |
> Unfortunately, the selection in portage seems very limited. Oops, |
13 |
> Polipo, and 3proxy seem to have gone dormant, and Apache Traffic |
14 |
> Server is still Bug#335637 ( http://bugs.gentoo.org/335637 ) |
15 |
> |
16 |
> So, what can I do? |
17 |
> |
18 |
> Rgds, |
19 |
> |
20 |
> |
21 |
|
22 |
Well, apache itself with mod_proxy works reasonably well but it doesn't |
23 |
support https and ftp, as far as I remember. Make sure to change the |
24 |
default config. I'll attach my config |
25 |
(/etc/apache2/modules.d/50_mod_proxy.conf). |
26 |
|
27 |
<IfModule mod_proxy.c> |
28 |
ProxyRequests On |
29 |
|
30 |
# Allow access from the local net only |
31 |
<Proxy *> |
32 |
Order deny,allow |
33 |
Deny from all |
34 |
Allow from 192.168. |
35 |
Allow from 127. |
36 |
</Proxy> |
37 |
|
38 |
# Enable/disable the handling of HTTP/1.1 "Via:" headers. |
39 |
# ("Full" adds the server version; |
40 |
# "Block" removes all outgoing Via: headers) |
41 |
# Set to one of: Off | On | Full | Block |
42 |
ProxyVia On |
43 |
|
44 |
# Enable the cache as well |
45 |
# (no caching without CacheRoot) |
46 |
<IfModule mod_cache.c> |
47 |
<IfModule mod_disk_cache.c> |
48 |
CacheRoot "/var/cache/apache2/proxy" |
49 |
CacheEnable disk / |
50 |
|
51 |
# Using many CacheDirLevels makes cache cleanup very slow |
52 |
CacheDirLevels 1 |
53 |
# Using long names can lead to too many files per directory for FS |
54 |
CacheDirLength 2 |
55 |
</IfModule> |
56 |
</IfModule> |
57 |
</IfModule> |
58 |
|
59 |
There is no size limit for apache's cache. For this, you have to execute |
60 |
htcacheclean as a cron job. |
61 |
|
62 |
Hope this helps, |
63 |
Florian Philipp |