Commit 2e231b5e8c67e5864e238cf996bce3462e0a1a10
1 parent
656a6f25
Exists in
master
and in
29 other branches
Updated varnish documentation file
Showing
1 changed file
with
30 additions
and
35 deletions
Show diff stats
INSTALL.varnish
@@ -11,67 +11,62 @@ Varnish can be set up to use with Noosfero with the following steps: | @@ -11,67 +11,62 @@ Varnish can be set up to use with Noosfero with the following steps: | ||
11 | 11 | ||
12 | # apt-get install varnish | 12 | # apt-get install varnish |
13 | 13 | ||
14 | -Noosfero was tested with Varnish 2.x. If you are using a Debian Lenny (and you | ||
15 | -should, unless Debian already released Squeeze by now), make sure you install | ||
16 | -varnish from the lenny-backports suite. | ||
17 | - | ||
18 | Install the RPAF apache module (or skip this step if not using apache): | 14 | Install the RPAF apache module (or skip this step if not using apache): |
19 | 15 | ||
20 | # apt-get install libapache2-mod-rpaf | 16 | # apt-get install libapache2-mod-rpaf |
21 | 17 | ||
22 | -3) Enable varnish logging: | ||
23 | - | ||
24 | -3a) Edit /etc/default/varnishncsa and uncomment the line that contains: | ||
25 | - | ||
26 | -VARNISHNCSA_ENABLED=1 | ||
27 | - | ||
28 | -The varnish log will be written to /var/log/varnish/varnishncsa.log in an | ||
29 | -apache-compatible format. You should change your statistics generation software | ||
30 | -(e.g. awstats) to use that instead of apache logs. | ||
31 | - | ||
32 | -3b) Restart Varnish Logging service | ||
33 | - | ||
34 | - # invoke-rc.d varnishncsa start | 18 | +3) Change Apache to listen on port 8080 instead of 80 |
35 | 19 | ||
36 | -4) Change Apache to listen on port 8080 instead of 80 | ||
37 | - | ||
38 | -4a) Edit /etc/apache2/ports.conf, and: | 20 | +3a) Edit /etc/apache2/ports.conf, and: |
39 | 21 | ||
40 | * change 'Listen 80' to 'Listen 127.0.0.1:8080' | 22 | * change 'Listen 80' to 'Listen 127.0.0.1:8080' |
41 | * change 'NameVirtualHost *:80' to 'NameVirtualHost *:8080' | 23 | * change 'NameVirtualHost *:80' to 'NameVirtualHost *:8080' |
42 | 24 | ||
43 | -4b) Edit /etc/apache2/sites-enabled/*, and change '<VirtualHost *:80>' to '<VirtualHost *:8080>' | 25 | +3b) Edit /etc/apache2/sites-enabled/*, and change '<VirtualHost *:80>' to '<VirtualHost *:8080>' |
44 | 26 | ||
45 | -4c) Restart apache | 27 | +3c) Restart apache |
46 | 28 | ||
47 | # invoke-rc.d apache2 restart | 29 | # invoke-rc.d apache2 restart |
48 | 30 | ||
49 | -5) Change Varnish to listen on port 80 | 31 | +4) Varnish configuration |
50 | 32 | ||
51 | -5a) Edit /etc/default/varnish and change '-a :6081' to '-a :80' | 33 | +4a) Edit /etc/default/varnish |
34 | + * change '-a :6081' to '-a :80' | ||
35 | + * change from "no" to "yes" in the line that contains "START=no" | ||
52 | 36 | ||
53 | -5b) Restart Varnish | 37 | +4b) Restart Varnish |
54 | 38 | ||
55 | # invoke-rc.d varnish restart | 39 | # invoke-rc.d varnish restart |
56 | 40 | ||
57 | -6) Configure varnish to fit noosfero | ||
58 | -(assuming Noosfero is installed in /var/lib/noosfero) | 41 | +5) Configure varnish to fit noosfero |
42 | +(assuming Noosfero is installed in /usr/share/noosfero) | ||
59 | 43 | ||
60 | -6a) Configure noosfero to do specific routines to varnish | 44 | +Add the following lines to the end of your /etc/varnish/default.vcl |
45 | +file: | ||
61 | 46 | ||
62 | -Add the following line to your /etc/varnish/default.vcl file: | 47 | + include "/etc/noosfero/varnish-noosfero.vcl"; |
48 | + include "/etc/noosfero/varnish-accept-language.vcl"; | ||
63 | 49 | ||
64 | - include "/var/lib/noosfero/etc/noosfero/varnish-noosfero.vcl"; | 50 | +On manual installations, change "/etc/noosfero/*" to |
51 | +"{Rails.root}/etc/noosfero/*" | ||
65 | 52 | ||
66 | -6b) Configure varnish to store separate caches for each language | 53 | +6) Restart Varnish |
67 | 54 | ||
68 | -Add the following line to your /etc/varnish/default.vcl file: | 55 | + # invoke-rc.d varnish restart |
69 | 56 | ||
70 | - include "/var/lib/noosfero/etc/noosfero/varnish-accept-language.vcl"; | 57 | +7) Enable varnish logging: |
71 | 58 | ||
72 | -7) Restart Varnish | 59 | +7a) Edit /etc/default/varnishncsa and uncomment the line that contains: |
73 | 60 | ||
74 | - # invoke-rc.d varnish restart | 61 | +VARNISHNCSA_ENABLED=1 |
62 | + | ||
63 | +The varnish log will be written to /var/log/varnish/varnishncsa.log in an | ||
64 | +apache-compatible format. You should change your statistics generation software | ||
65 | +(e.g. awstats) to use that instead of apache logs. | ||
66 | + | ||
67 | +7b) Restart Varnish Logging service | ||
68 | + | ||
69 | + # invoke-rc.d varnishncsa restart | ||
75 | 70 | ||
76 | Thanks to Cosimo Streppone for varnish-accept-language. See | 71 | Thanks to Cosimo Streppone for varnish-accept-language. See |
77 | http://github.com/cosimo/varnish-accept-language for more information. | 72 | http://github.com/cosimo/varnish-accept-language for more information. |