Note that there are some explanatory texts on larger screens.

plurals
  1. POVarnish DAEMON_OPTS Options Errors
    text
    copied!<p>When using inline C with Varnish I've not been able to get /etc/varnish/default<br> to be happy at start up.</p> <p>I've tested inline C with varnish for two things: GeoIP detection and Anti-Site-Scraping functions.</p> <p>The DAEMON_OPTS always complains even though I'm following what other seem<br> to indicate works fine.</p> <p>My problem is that this command line start up works: </p> <pre><code>varnishd -f /etc/varnish/varnish-default.conf -s file,/var/lib/varnish/varnish_storage.bin,512M -T 127.0.0.1:2000 -a 0.0.0.0:8080 -p 'cc_command=exec cc -fpic -shared -Wl,-x -L/usr/include/libmemcached/memcached.h -lmemcached -o %o %s' </code></pre> <p>But it errors out with trying to start up from default start scripts:</p> <p>/etc/default/varnish has this in it:</p> <pre><code>DAEMON_OPTS="-a :8080 \ -T localhost:2000 \ -f /etc/varnish/varnish-default.conf \ -s file,/var/lib/varnish/varnish_storage.bin,512M \ -p 'cc_command=exec cc -fpic -shared -Wl,-x -L/usr/include/libmemcached/memcached.h -lmemcached -o %o %s'" </code></pre> <p>The error is: </p> <pre><code># /etc/init.d/varnish start Starting HTTP accelerator: varnishd failed! storage_file: filename: /var/lib/varnish/vbox.local/varnish_storage.bin size 512 MB. Error: Unknown parameter "'cc_command". </code></pre> <p>If I try change the last line to:</p> <pre><code>-p cc_command='exec cc -fpic -shared -Wl,-x -L/usr/include/libmemcached/memcached.h -lmemcached -o %o %s'" </code></pre> <p>It's error is now:</p> <pre><code># /etc/init.d/varnish start Starting HTTP accelerator: varnishd failed! storage_file: filename: /var/lib/varnish/vbox.local/varnish_storage.bin size 512 MB. Error: Unknown storage method "hared" </code></pre> <p>It's trying to interpret the '-shared' as -s hared and 'hared' is not a storage type.</p> <p>For both GeoIP and the Anti-Site-Scrape I've used the exact recommended daemon options<br> plus have tried all sorts of variations like adding \' and '' but no joy.</p> <p>Here is a link to the instruction I've followed that work fine except the DAEMON_OPTS part.<br> <a href="http://drcarter.info/2010/04/how-fighting-against-scraping-using-varnish-vcl-inline-c-memcached/" rel="noreferrer">http://drcarter.info/2010/04/how-fighting-against-scraping-using-varnish-vcl-inline-c-memcached/</a> </p> <p>I'm using Debian and the exact DAEMON_OPTS as stated in the instructions.</p> <p>Can anyone help with a pointer on what's going wrong here?</p> <p>Many thanks!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload