Literal block colons in fully minimized form

parent db55f5f3
...@@ -54,7 +54,7 @@ Syntax ...@@ -54,7 +54,7 @@ Syntax
Commands are usually terminated with a newline. Long command can be Commands are usually terminated with a newline. Long command can be
entered using sh style *here documents*. The format of here-documents entered using sh style *here documents*. The format of here-documents
is::: is::
<< word << word
here document here document
...@@ -233,7 +233,7 @@ file on the fly. ...@@ -233,7 +233,7 @@ file on the fly.
Use the unix file permissions to control access to the file. Use the unix file permissions to control access to the file.
An authenticated session looks like this::: An authenticated session looks like this::
critter phk> telnet localhost 1234 critter phk> telnet localhost 1234
Trying ::1... Trying ::1...
...@@ -273,7 +273,7 @@ following byte sequence: ...@@ -273,7 +273,7 @@ following byte sequence:
and dumping the resulting digest in lower-case hex. and dumping the resulting digest in lower-case hex.
In the above example, the secret file contained foo\n and thus::: In the above example, the secret file contained foo\n and thus::
critter phk> cat > _ critter phk> cat > _
ixslvvxrgkjptxmcgnnsdxsvdmvfympg ixslvvxrgkjptxmcgnnsdxsvdmvfympg
...@@ -300,18 +300,18 @@ EXAMPLES ...@@ -300,18 +300,18 @@ EXAMPLES
======== ========
Simple example: All requests where req.url exactly matches the string Simple example: All requests where req.url exactly matches the string
/news are banned from the cache::: /news are banned from the cache::
req.url == "/news" req.url == "/news"
Example: Ban all documents where the name does not end with ".ogg", Example: Ban all documents where the name does not end with ".ogg",
and where the size of the object is greater than 10 megabytes::: and where the size of the object is greater than 10 megabytes::
req.url !~ "\.ogg$" && obj.size > 10MB req.url !~ "\.ogg$" && obj.size > 10MB
Example: Ban all documents where the serving host is "example.com" Example: Ban all documents where the serving host is "example.com"
or "www.example.com", and where the Set-Cookie header received from or "www.example.com", and where the Set-Cookie header received from
the backend contains "USERID=1663"::: the backend contains "USERID=1663"::
req.http.host ~ "^(?i)(www\.)example.com$" && obj.set-cookie ~ "USERID=1663" req.http.host ~ "^(?i)(www\.)example.com$" && obj.set-cookie ~ "USERID=1663"
......
...@@ -66,7 +66,7 @@ zero if the command succeeded, and non-zero otherwise. ...@@ -66,7 +66,7 @@ zero if the command succeeded, and non-zero otherwise.
EXAMPLES EXAMPLES
======== ========
Some ways you can use varnishadm::: Some ways you can use varnishadm::
varnishadm -T localhost:999 -S /var/db/secret vcl.use foo varnishadm -T localhost:999 -S /var/db/secret vcl.use foo
echo vcl.use foo | varnishadm -T localhost:999 -S /var/db/secret echo vcl.use foo | varnishadm -T localhost:999 -S /var/db/secret
......
...@@ -142,11 +142,11 @@ The following log entry tags are currently defined: ...@@ -142,11 +142,11 @@ The following log entry tags are currently defined:
EXAMPLES EXAMPLES
======== ========
The following command line simply copies all log entries to a log file::: The following command line simply copies all log entries to a log file::
$ varnishlog -w /var/log/varnish.log $ varnishlog -w /var/log/varnish.log
The following command line reads that same log file and displays requests for the front page::: The following command line reads that same log file and displays requests for the front page::
$ varnishlog -r /var/log/varnish.log -c -m 'RxURL:^/$' $ varnishlog -r /var/log/varnish.log -c -m 'RxURL:^/$'
......
...@@ -79,12 +79,12 @@ EXAMPLES ...@@ -79,12 +79,12 @@ EXAMPLES
======== ========
The following example displays a continuously updated list of the most The following example displays a continuously updated list of the most
frequently requested URLs::: frequently requested URLs::
varnishtop -i RxURL varnishtop -i RxURL
The following example displays a continuously updated list of the most The following example displays a continuously updated list of the most
commonly used user agents::: commonly used user agents::
varnishtop -i RxHeader -C -I ^User-Agent varnishtop -i RxHeader -C -I ^User-Agent
......
...@@ -96,14 +96,14 @@ file as a quoted string. ...@@ -96,14 +96,14 @@ file as a quoted string.
Backend declarations Backend declarations
-------------------- --------------------
A backend declaration creates and initializes a named backend object::: A backend declaration creates and initializes a named backend object::
backend www { backend www {
.host = "www.example.com"; .host = "www.example.com";
.port = "http"; .port = "http";
} }
The backend object can later be used to select a backend at request time::: The backend object can later be used to select a backend at request time::
if (req.http.host ~ "(?i)^(www.)?example.com$") { if (req.http.host ~ "(?i)^(www.)?example.com$") {
set req.backend = www; set req.backend = www;
...@@ -118,7 +118,7 @@ backend connection, .first_byte_timeout for the time to wait for the ...@@ -118,7 +118,7 @@ backend connection, .first_byte_timeout for the time to wait for the
first byte from the backend and .between_bytes_timeout for time to first byte from the backend and .between_bytes_timeout for time to
wait between each received byte. wait between each received byte.
These can be set in the declaration like this::: These can be set in the declaration like this::
backend www { backend www {
.host = "www.example.com"; .host = "www.example.com";
...@@ -145,7 +145,7 @@ be used. ...@@ -145,7 +145,7 @@ be used.
There are several types of directors. The different director types There are several types of directors. The different director types
use different algorithms to choose which backend to use. use different algorithms to choose which backend to use.
Configuring a director may look like this::: Configuring a director may look like this::
director b2 random { director b2 random {
.retries = 5; .retries = 5;
...@@ -312,7 +312,7 @@ Probes take the following parameters: ...@@ -312,7 +312,7 @@ Probes take the following parameters:
Default is 2 seconds. Default is 2 seconds.
A backend with a probe can be defined like this, together with the A backend with a probe can be defined like this, together with the
backend or director::: backend or director::
backend www { backend www {
.host = "www.example.com"; .host = "www.example.com";
...@@ -326,7 +326,7 @@ backend or director::: ...@@ -326,7 +326,7 @@ backend or director:::
} }
} }
Or it can be defined separately and then referenced::: Or it can be defined separately and then referenced::
probe healthcheck { probe healthcheck {
.url = "/status.cgi"; .url = "/status.cgi";
...@@ -361,7 +361,7 @@ ACLs ...@@ -361,7 +361,7 @@ ACLs
---- ----
An ACL declaration creates and initializes a named access control list An ACL declaration creates and initializes a named access control list
which can later be used to match client addresses::: which can later be used to match client addresses::
acl local { acl local {
"localhost"; // myself "localhost"; // myself
...@@ -375,7 +375,7 @@ if it is preceded by a negation mark, it will reject any address it is ...@@ -375,7 +375,7 @@ if it is preceded by a negation mark, it will reject any address it is
compared to, which may not be what you intended. If the entry is compared to, which may not be what you intended. If the entry is
enclosed in parentheses, however, it will simply be ignored. enclosed in parentheses, however, it will simply be ignored.
To match an IP address against an ACL, simply use the match operator::: To match an IP address against an ACL, simply use the match operator::
if (client.ip ~ local) { if (client.ip ~ local) {
return (pipe); return (pipe);
...@@ -390,7 +390,7 @@ PCRE(3) man page. ...@@ -390,7 +390,7 @@ PCRE(3) man page.
To send flags to the PCRE engine, such as to turn on *case To send flags to the PCRE engine, such as to turn on *case
insensitivity* add the flag within parens following a question mark, insensitivity* add the flag within parens following a question mark,
like this::: like this::
if (req.http.host ~ "(?i)example.com$") { if (req.http.host ~ "(?i)example.com$") {
... ...
...@@ -424,7 +424,7 @@ ban_url(regex) ...@@ -424,7 +424,7 @@ ban_url(regex)
Subroutines Subroutines
~~~~~~~~~~~ ~~~~~~~~~~~
A subroutine is used to group code for legibility or reusability::: A subroutine is used to group code for legibility or reusability::
sub pipe_if_local { sub pipe_if_local {
if (client.ip ~ local) { if (client.ip ~ local) {
...@@ -646,7 +646,7 @@ appear in the source. ...@@ -646,7 +646,7 @@ appear in the source.
The default versions distributed with Varnish will be implicitly The default versions distributed with Varnish will be implicitly
concatenated as a last resort at the end. concatenated as a last resort at the end.
Example::: Example::
# in file "main.vcl" # in file "main.vcl"
include "backends.vcl"; include "backends.vcl";
...@@ -891,7 +891,7 @@ resp.response ...@@ -891,7 +891,7 @@ resp.response
resp.http.header resp.http.header
The corresponding HTTP header. The corresponding HTTP header.
Values may be assigned to variables using the set keyword::: Values may be assigned to variables using the set keyword::
sub vcl_recv { sub vcl_recv {
# Normalize the Host: header # Normalize the Host: header
...@@ -900,7 +900,7 @@ Values may be assigned to variables using the set keyword::: ...@@ -900,7 +900,7 @@ Values may be assigned to variables using the set keyword:::
} }
} }
HTTP headers can be removed entirely using the remove keyword::: HTTP headers can be removed entirely using the remove keyword::
sub vcl_fetch { sub vcl_fetch {
# Don't cache cookies # Don't cache cookies
...@@ -942,7 +942,7 @@ EXAMPLES ...@@ -942,7 +942,7 @@ EXAMPLES
The following code is the equivalent of the default configuration with The following code is the equivalent of the default configuration with
the backend address set to "backend.example.com" and no backend port the backend address set to "backend.example.com" and no backend port
specified::: specified::
backend default { backend default {
.host = "backend.example.com"; .host = "backend.example.com";
...@@ -954,7 +954,7 @@ specified::: ...@@ -954,7 +954,7 @@ specified:::
The following example shows how to support multiple sites running on The following example shows how to support multiple sites running on
separate backends in the same Varnish instance, by selecting backends separate backends in the same Varnish instance, by selecting backends
based on the request URL::: based on the request URL::
backend www { backend www {
.host = "www.example.com"; .host = "www.example.com";
...@@ -980,7 +980,7 @@ based on the request URL::: ...@@ -980,7 +980,7 @@ based on the request URL:::
The following snippet demonstrates how to force a minimum TTL for The following snippet demonstrates how to force a minimum TTL for
all documents. Note that this is not the same as setting the all documents. Note that this is not the same as setting the
default_ttl run-time parameter, as that only affects document for default_ttl run-time parameter, as that only affects document for
which the backend did not specify a TTL::: which the backend did not specify a TTL::
import std; # needed for std.log import std; # needed for std.log
...@@ -992,7 +992,7 @@ which the backend did not specify a TTL::: ...@@ -992,7 +992,7 @@ which the backend did not specify a TTL:::
} }
The following snippet demonstrates how to force Varnish to cache The following snippet demonstrates how to force Varnish to cache
documents even when cookies are present::: documents even when cookies are present::
sub vcl_recv { sub vcl_recv {
if (req.request == "GET" && req.http.cookie) { if (req.request == "GET" && req.http.cookie) {
...@@ -1007,7 +1007,7 @@ documents even when cookies are present::: ...@@ -1007,7 +1007,7 @@ documents even when cookies are present:::
} }
The following code implements the HTTP PURGE method as used by Squid The following code implements the HTTP PURGE method as used by Squid
for object invalidation::: for object invalidation::
acl purge { acl purge {
"localhost"; "localhost";
......
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