Commit df85f7798beb1e6381784e9825d5c5ac743af8a3
1 parent
2e231b5e
Exists in
master
and in
28 other branches
Review varnish configuration
Showing
1 changed file
with
9 additions
and
17 deletions
Show diff stats
INSTALL.varnish
| ... | ... | @@ -5,7 +5,9 @@ recommended. See http://www.varnish-cache.org/ for more information on Varnish. |
| 5 | 5 | |
| 6 | 6 | Varnish can be set up to use with Noosfero with the following steps: |
| 7 | 7 | |
| 8 | -1) setup Noosfero with apache according to the INSTALL file. | |
| 8 | +1) setup Noosfero with apache according to the INSTALL file. If you used | |
| 9 | +the Debian package to install noosfero, you don't need to do anything | |
| 10 | +about this. | |
| 9 | 11 | |
| 10 | 12 | 2) install Varnish |
| 11 | 13 | |
| ... | ... | @@ -19,8 +21,8 @@ Install the RPAF apache module (or skip this step if not using apache): |
| 19 | 21 | |
| 20 | 22 | 3a) Edit /etc/apache2/ports.conf, and: |
| 21 | 23 | |
| 22 | - * change 'Listen 80' to 'Listen 127.0.0.1:8080' | |
| 23 | 24 | * change 'NameVirtualHost *:80' to 'NameVirtualHost *:8080' |
| 25 | + * change 'Listen 80' to 'Listen 127.0.0.1:8080' | |
| 24 | 26 | |
| 25 | 27 | 3b) Edit /etc/apache2/sites-enabled/*, and change '<VirtualHost *:80>' to '<VirtualHost *:8080>' |
| 26 | 28 | |
| ... | ... | @@ -34,15 +36,7 @@ Install the RPAF apache module (or skip this step if not using apache): |
| 34 | 36 | * change '-a :6081' to '-a :80' |
| 35 | 37 | * change from "no" to "yes" in the line that contains "START=no" |
| 36 | 38 | |
| 37 | -4b) Restart Varnish | |
| 38 | - | |
| 39 | - # invoke-rc.d varnish restart | |
| 40 | - | |
| 41 | -5) Configure varnish to fit noosfero | |
| 42 | -(assuming Noosfero is installed in /usr/share/noosfero) | |
| 43 | - | |
| 44 | -Add the following lines to the end of your /etc/varnish/default.vcl | |
| 45 | -file: | |
| 39 | +4b) Edit /etc/varnish/default.vcl and add the following lines at the end: | |
| 46 | 40 | |
| 47 | 41 | include "/etc/noosfero/varnish-noosfero.vcl"; |
| 48 | 42 | include "/etc/noosfero/varnish-accept-language.vcl"; |
| ... | ... | @@ -50,13 +44,13 @@ file: |
| 50 | 44 | On manual installations, change "/etc/noosfero/*" to |
| 51 | 45 | "{Rails.root}/etc/noosfero/*" |
| 52 | 46 | |
| 53 | -6) Restart Varnish | |
| 47 | +4c) Restart Varnish | |
| 54 | 48 | |
| 55 | 49 | # invoke-rc.d varnish restart |
| 56 | 50 | |
| 57 | -7) Enable varnish logging: | |
| 51 | +5) Enable varnish logging: | |
| 58 | 52 | |
| 59 | -7a) Edit /etc/default/varnishncsa and uncomment the line that contains: | |
| 53 | +5a) Edit /etc/default/varnishncsa and uncomment the line that contains: | |
| 60 | 54 | |
| 61 | 55 | VARNISHNCSA_ENABLED=1 |
| 62 | 56 | |
| ... | ... | @@ -64,11 +58,9 @@ The varnish log will be written to /var/log/varnish/varnishncsa.log in an |
| 64 | 58 | apache-compatible format. You should change your statistics generation software |
| 65 | 59 | (e.g. awstats) to use that instead of apache logs. |
| 66 | 60 | |
| 67 | -7b) Restart Varnish Logging service | |
| 61 | +5b) Restart Varnish Logging service | |
| 68 | 62 | |
| 69 | 63 | # invoke-rc.d varnishncsa restart |
| 70 | 64 | |
| 71 | 65 | Thanks to Cosimo Streppone for varnish-accept-language. See |
| 72 | 66 | http://github.com/cosimo/varnish-accept-language for more information. |
| 73 | - | |
| 74 | - -- Antonio Terceiro <terceiro@colivre.coop.br> Sat, 04 Sep 2010 17:29:27 -0300 | ... | ... |