From ce6d678ac99d12903c095874031345ac778015a6 Mon Sep 17 00:00:00 2001 From: Aurelio A. Heckert Date: Mon, 14 Mar 2011 16:24:12 -0300 Subject: [PATCH] Create a noosfero configuration file for varnish --- INSTALL.varnish | 16 ++++++++++++---- etc/noosfero/varnish-noosfero.vcl | 137 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ public/designs/themes/base/errors.css | 11 ++++++++++- 3 files changed, 159 insertions(+), 5 deletions(-) create mode 100644 etc/noosfero/varnish-noosfero.vcl diff --git a/INSTALL.varnish b/INSTALL.varnish index 9285b57..bb875b6 100644 --- a/INSTALL.varnish +++ b/INSTALL.varnish @@ -50,14 +50,22 @@ apache-compatible format. You should change your statistics generation software # invoke-rc.d varnish restart -6) Configure varnish to store separate caches for each language +6) Configure varnish to fit noosfero +(assuming Noosfero is installed in /var/lib/noosfero) -6a) Add the following line to your /etc/varnish/default.vcl file (assuming -Noosfero is installed in /var/lib/noosfero): +6a) Configure noosfero specific rotines to varnish + +Add the following line to your /etc/varnish/default.vcl file: + + include "/var/lib/noosfero/etc/noosfero/varnish-noosfero.vcl"; + +6b) Configure varnish to store separate caches for each language + +Add the following line to your /etc/varnish/default.vcl file: include "/var/lib/noosfero/etc/noosfero/varnish-accept-language.vcl"; -6b) Restart Varnish +8) Restart Varnish # invoke-rc.d varnish restart diff --git a/etc/noosfero/varnish-noosfero.vcl b/etc/noosfero/varnish-noosfero.vcl new file mode 100644 index 0000000..dd3c168 --- /dev/null +++ b/etc/noosfero/varnish-noosfero.vcl @@ -0,0 +1,137 @@ + +backend default { + .host = "127.0.0.1"; + .port = "8080"; +} + +sub vcl_error { + set obj.http.Content-Type = "text/html; charset=utf-8"; + + synthetic {" + + + + + + Technical problems + + + + + + +
+ + + + + + + + + + + + + + + + + + +
+ + + "}; + return(deliver); +} diff --git a/public/designs/themes/base/errors.css b/public/designs/themes/base/errors.css index c880fd4..ef595ab 100644 --- a/public/designs/themes/base/errors.css +++ b/public/designs/themes/base/errors.css @@ -19,17 +19,26 @@ body { background: #ccc url(imgs/menu-top-bg-right.png) top right no-repeat; height: 42px; margin-top: 48px; + position: relative; } #logo { background: url(imgs/menu-top-bg-left.png) 0px 29px no-repeat; position: absolute; - top: 40px; + top: -29px; height: 92px; width: 400px; z-index: 2; } +#details { + position: absolute; + bottom: 1px; + right: 13px; + color: #EEE; + Xtext-shadow: 1px 1px 1px #fff; +} + .message, #languages { margin: 0px 20px; -- libgit2 0.21.2