From fb2d8f79d63986b5286c0ca635eb3aaedded0ba5 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Fri, 2 Jun 2017 22:22:44 +0900 Subject: [PATCH] Update doc --- doc/sources/nghttpx-howto.rst | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/doc/sources/nghttpx-howto.rst b/doc/sources/nghttpx-howto.rst index e7549de8..391bdaa5 100644 --- a/doc/sources/nghttpx-howto.rst +++ b/doc/sources/nghttpx-howto.rst @@ -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 special meaning in shell. -To route, request to request path whose prefix is ``/foo`` to backend -server ``[::1]:8080``, you can write like so: +To route, request to request path ``/foo`` to backend server +``[::1]:8080``, you can write like so: .. code-block:: text 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 time: