diff options
Diffstat (limited to 'README')
-rw-r--r-- | README | 39 |
1 files changed, 15 insertions, 24 deletions
@@ -46,30 +46,7 @@ The redirection database has the following structure 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; @@ -116,6 +93,19 @@ The VCL code differs only in the call to dbrw.config in vcl_recv: 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: @@ -127,6 +117,7 @@ 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 |