Commit 7a4538d0 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp
parents b8ceaaa8 446d5226
......@@ -13,9 +13,8 @@ VCL is an acronym for Varnish Configuration Language. In a VCL file, you config
**Where is the documentation on VCL?**
We are working on documenting VCL. The `WIKI <http://varnish-cache.org/wiki/VCLExamples>`_ contains some examples.
Please also see ``man 7 vcl``.
Please see ``man 7 vcl``. There are also some real-world examples on
the `wiki <http://varnish-cache.org/wiki/VCLExamples>`_
**How do I load VCL file while Varnish is running?**
......
......@@ -7,6 +7,7 @@ The Varnish Reference Manual
.. toctree::
vcl.rst
varnish-cli.rst
varnishadm.rst
varnishd.rst
varnishhist.rst
......
......@@ -53,8 +53,10 @@ OPTIONS
-F Run in the foreground.
-f config Use the specified VCL configuration file instead of the builtin default. See vcl(7) for
details on VCL syntax.
-f config Use the specified VCL configuration file instead of the
builtin default. See vcl(7) for details on VCL
syntax. When no configuration is supplied varnishd will
not start the cache process.
-g group Specifies the name of an unprivileged group to which the child process should switch
before it starts accepting connections. This is a shortcut for specifying the group
......@@ -95,11 +97,14 @@ OPTIONS
-M address:port
Connect to this port and offer the command line
interface. Think of it as a reverse shell.
interface. Think of it as a reverse shell. When running with
-M and there is no backend defined the child process (the cache)
will not start initially.
-t ttl
Specifies a hard minimum time to live for cached documents. This is a shortcut for
specifying the default_ttl run-time parameter.
Specifies a hard minimum time to live for cached
documents. This is a shortcut for specifying the
default_ttl run-time parameter.
-u user Specifies the name of an unprivileged user to which the child
process should switch before it starts accepting
......
......@@ -114,6 +114,14 @@ rh_status_q() {
rh_status >/dev/null 2>&1
}
configtest() {
if [ -f "$VARNISH_VCL_CONF" ]; then
$exec -f "$VARNISH_VCL_CONF" -C -n /tmp > /dev/null && echo "Syntax ok"
else
echo "VARNISH_VCL_CONF is unset or does not point to a file"
fi
}
# See how we were called.
case "$1" in
start)
......@@ -141,6 +149,9 @@ case "$1" in
rh_status_q || exit 0
restart
;;
configtest)
configtest
;;
*)
echo "Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment