diff --git a/INSTALL.varnish b/INSTALL.varnish index b17679e..311d209 100644 --- a/INSTALL.varnish +++ b/INSTALL.varnish @@ -11,67 +11,62 @@ Varnish can be set up to use with Noosfero with the following steps: # apt-get install varnish -Noosfero was tested with Varnish 2.x. If you are using a Debian Lenny (and you -should, unless Debian already released Squeeze by now), make sure you install -varnish from the lenny-backports suite. - Install the RPAF apache module (or skip this step if not using apache): # apt-get install libapache2-mod-rpaf -3) Enable varnish logging: - -3a) Edit /etc/default/varnishncsa and uncomment the line that contains: - -VARNISHNCSA_ENABLED=1 - -The varnish log will be written to /var/log/varnish/varnishncsa.log in an -apache-compatible format. You should change your statistics generation software -(e.g. awstats) to use that instead of apache logs. - -3b) Restart Varnish Logging service - - # invoke-rc.d varnishncsa start +3) Change Apache to listen on port 8080 instead of 80 -4) Change Apache to listen on port 8080 instead of 80 - -4a) Edit /etc/apache2/ports.conf, and: +3a) Edit /etc/apache2/ports.conf, and: * change 'Listen 80' to 'Listen 127.0.0.1:8080' * change 'NameVirtualHost *:80' to 'NameVirtualHost *:8080' -4b) Edit /etc/apache2/sites-enabled/*, and change '' to '' +3b) Edit /etc/apache2/sites-enabled/*, and change '' to '' -4c) Restart apache +3c) Restart apache # invoke-rc.d apache2 restart -5) Change Varnish to listen on port 80 +4) Varnish configuration -5a) Edit /etc/default/varnish and change '-a :6081' to '-a :80' +4a) Edit /etc/default/varnish + * change '-a :6081' to '-a :80' + * change from "no" to "yes" in the line that contains "START=no" -5b) Restart Varnish +4b) Restart Varnish # invoke-rc.d varnish restart -6) Configure varnish to fit noosfero -(assuming Noosfero is installed in /var/lib/noosfero) +5) Configure varnish to fit noosfero +(assuming Noosfero is installed in /usr/share/noosfero) -6a) Configure noosfero to do specific routines to varnish +Add the following lines to the end of your /etc/varnish/default.vcl +file: -Add the following line to your /etc/varnish/default.vcl file: + include "/etc/noosfero/varnish-noosfero.vcl"; + include "/etc/noosfero/varnish-accept-language.vcl"; - include "/var/lib/noosfero/etc/noosfero/varnish-noosfero.vcl"; +On manual installations, change "/etc/noosfero/*" to +"{Rails.root}/etc/noosfero/*" -6b) Configure varnish to store separate caches for each language +6) Restart Varnish -Add the following line to your /etc/varnish/default.vcl file: + # invoke-rc.d varnish restart - include "/var/lib/noosfero/etc/noosfero/varnish-accept-language.vcl"; +7) Enable varnish logging: -7) Restart Varnish +7a) Edit /etc/default/varnishncsa and uncomment the line that contains: - # invoke-rc.d varnish restart +VARNISHNCSA_ENABLED=1 + +The varnish log will be written to /var/log/varnish/varnishncsa.log in an +apache-compatible format. You should change your statistics generation software +(e.g. awstats) to use that instead of apache logs. + +7b) Restart Varnish Logging service + + # invoke-rc.d varnishncsa restart Thanks to Cosimo Streppone for varnish-accept-language. See http://github.com/cosimo/varnish-accept-language for more information. -- libgit2 0.21.2