Commit 4bb2ac938d9b94219ea4818d71cfa4d96abfe670

Authored by Antonio Terceiro
2 parents d88dcc33 8d7dd8c8

Merge commit 'refs/merge-requests/206' of git://gitorious.org/noosfero/noosfero …

…into merge-requests/206
INSTALL.varnish
@@ -15,6 +15,10 @@ Noosfero was tested with Varnish 2.x. If you are using a Debian Lenny (and you @@ -15,6 +15,10 @@ 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 15 should, unless Debian already released Squeeze by now), make sure you install
16 varnish from the lenny-backports suite. 16 varnish from the lenny-backports suite.
17 17
  18 +Install the RPAF apache module (or skip this step if not using apache):
  19 +
  20 + # apt-get install libapache2-mod-rpaf
  21 +
18 3) Enable varnish logging: 22 3) Enable varnish logging:
19 23
20 3a) Edit /etc/default/varnishncsa and uncomment the line that contains: 24 3a) Edit /etc/default/varnishncsa and uncomment the line that contains:
debian/control
@@ -61,8 +61,7 @@ Description: free web-based platform for social networks @@ -61,8 +61,7 @@ Description: free web-based platform for social networks
61 61
62 Package: noosfero-apache 62 Package: noosfero-apache
63 Architecture: all 63 Architecture: all
64 -Depends: apache2, debconf  
65 -Suggests: noosfero 64 +Depends: apache2, debconf, noosfero
66 Description: free web-based platform for social networks (apache frontend) 65 Description: free web-based platform for social networks (apache frontend)
67 Noosfero is a web platform for social and solidarity economy networks with 66 Noosfero is a web platform for social and solidarity economy networks with
68 blog, e-Porfolios, CMS, RSS, thematic discussion, events agenda and collective 67 blog, e-Porfolios, CMS, RSS, thematic discussion, events agenda and collective
etc/noosfero/varnish-noosfero.vcl
1 sub vcl_recv { 1 sub vcl_recv {
  2 + if (req.request == "GET" || req.request == "HEAD") {
2 if (req.http.Cookie) { 3 if (req.http.Cookie) {
3 - # We only care about the "_noosfero_session.*" cookie, used for  
4 - # authentication.  
5 - if (req.http.Cookie ~ "_noosfero_session.*" ) {  
6 - return (pass);  
7 - }  
8 - # Else strip all cookies 4 + # We only care about the "_noosfero_session.*" cookie, used for
  5 + # authentication.
  6 + if (req.http.Cookie !~ "_noosfero_session.*" ) {
  7 + # strip all cookies
9 unset req.http.Cookie; 8 unset req.http.Cookie;
  9 + }
10 } 10 }
  11 + }
11 } 12 }
12 13
13 sub vcl_error { 14 sub vcl_error {
test/integration/varnish_conf_test.rb 0 → 100644
@@ -0,0 +1,9 @@ @@ -0,0 +1,9 @@
  1 +require 'test/unit'
  2 +
  3 +class VarnishConfTest < Test::Unit::TestCase
  4 +
  5 + def test_not_use_return_in_varnish_noosfero
  6 + assert !system('grep "return.*pass" etc/noosfero/varnish-noosfero.vcl')
  7 + end
  8 +
  9 +end