aboutsummaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
Diffstat (limited to 'README')
-rw-r--r--README39
1 files changed, 15 insertions, 24 deletions
diff --git a/README b/README
index c4dbbdd..a3d3ffc 100644
--- a/README
+++ b/README
@@ -43,36 +43,13 @@ The redirection database has the following structure
host varchar(255) NOT NULL DEFAULT '',
url varchar(255) NOT NULL DEFAULT '',
dest varchar(255) DEFAULT NULL,
PRIMARY KEY (host,url)
);
-VCL 3.x code:
-
- import dbrw;
-
- sub vcl_recv {
- dbrw.config("mysql", "database=dbname;user=varnish;debug=1",
- "SELECT dest FROM redirects WHERE host='$host' AND url='$url'");
- set req.http.X-Redirect-To =
- dbrw.rewrite("host=" + req.http.Host + ";" +
- "url=" + req.url);
- if (req.http.X-Redirect-To != "") {
- error(750, "Redirect");
- }
- }
-
- sub vcl_error {
- if (obj.status == 750) {
- set obj.http.Location = req.http.X-Redirect-To;
- set obj.status = 301;
- return (deliver);
- }
- }
-
-VCL 4.0 code:
+The VCL code:
import dbrw;
sub vcl_recv {
dbrw.config("mysql", "database=dbname;user=varnish;debug=1",
"SELECT dest FROM redirects WHERE host='$host' AND url='$url'");
@@ -113,23 +90,37 @@ The VCL code differs only in the call to dbrw.config in vcl_recv:
}
* Installation
In order to compile the package you need to have installed
varnishd and varnishapi package.
+<<<<<<< HEAD
+
+Supposing that condition is met, run:
+
+ ./configure
+
+It should be able to automatically find the necessary components. In case
+it doesn't, tweak the configuration variables as necessary. The most
+important one is PKG_CONFIG_PATH, which contains a path (in the UNIX sense)
+where the .pc files are located. It should contain a directory where the
+'varnishapi.pc' file lives. Example usage:
+
+=======
Supposing that condition is met, run:
./configure
It should be able to automatically find the necessary components. In case
it doesn't, tweak the configuration variables as necessary. The most
important one is PKG_CONFIG_PATH, which contains a path (in the UNIX sense)
where the .pc files are located. It should contain a directory where the
'varnishapi.pc' file lives. Example usage:
+>>>>>>> e0e3166a8bbe666414c2f0ee9c732f6254acf550
./configure PKG_CONFIG_PATH=/usr/local/varnish/lib/pkgconfig:$PKG_CONFIG_PATH
Please read the file INSTALL for a detailed discussion of available variables
and command line options.
Once configured, do

Return to:

Send suggestions and report system problems to the System administrator.