Update doc

This commit is contained in:
Tatsuhiro Tsujikawa 2017-06-02 22:22:44 +09:00
parent 8f7fa1b1bf
commit fb2d8f79d6
1 changed files with 20 additions and 2 deletions

View File

@ -297,13 +297,31 @@ When you write this option in command-line, you should enclose
argument with single or double quotes, since the character ``;`` has a argument with single or double quotes, since the character ``;`` has a
special meaning in shell. special meaning in shell.
To route, request to request path whose prefix is ``/foo`` to backend To route, request to request path ``/foo`` to backend server
server ``[::1]:8080``, you can write like so: ``[::1]:8080``, you can write like so:
.. code-block:: text .. code-block:: text
backend=::1,8080;/foo backend=::1,8080;/foo
If the last character of path pattern is ``/``, all request paths
which start with that pattern match:
.. code-block:: text
backend=::1,8080;/bar/
The request path ``/bar/buzz`` matches the ``/bar/``.
You can use ``*`` at the end of the path pattern to make it wildcard
pattern. ``*`` must match at least one character:
.. code-block:: text
backend=::1,8080;/sample*
The request path ``/sample1/foo`` matches the ``/sample*`` pattern.
Of course, you can specify both host and request path at the same Of course, you can specify both host and request path at the same
time: time: