You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by dj...@apache.org on 2013/05/20 08:56:33 UTC

[4/8] git commit: updated refs/heads/master to 7d1533e

docs: move section on HTTP proxying into configuration chapter


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/7d1533ee
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/7d1533ee
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/7d1533ee

Branch: refs/heads/master
Commit: 7d1533eee9a7e93ecfce40d62ea1588d077d4b84
Parents: 00520c3
Author: Dirkjan Ochtman <dj...@apache.org>
Authored: Mon May 20 08:54:58 2013 +0200
Committer: Dirkjan Ochtman <dj...@apache.org>
Committed: Mon May 20 08:54:58 2013 +0200

----------------------------------------------------------------------
 share/doc/src/configuring.rst   |   83 ++++++++++++++++++++++++++++++
 share/doc/src/http-proxying.rst |   94 ----------------------------------
 share/doc/src/index.rst         |    1 -
 3 files changed, 83 insertions(+), 95 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/7d1533ee/share/doc/src/configuring.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/configuring.rst b/share/doc/src/configuring.rst
index c364417..a555053 100644
--- a/share/doc/src/configuring.rst
+++ b/share/doc/src/configuring.rst
@@ -283,3 +283,86 @@ specify the ``-k`` option as the message reads:
 All done.
 
 .. _`http://www.openssl.org/docs/HOWTO/certificates.txt`: http://www.openssl.org/docs/HOWTO/certificates.txt
+
+.. _http-proxying:
+
+HTTP Proxying
+=============
+
+The HTTP proxy feature makes it easy to map and redirect different
+content through your CouchDB URL. The proxy works by mapping a pathname
+and passing all content after that prefix through to the configured
+proxy address.
+
+Configuration of the proxy redirect is handled through the
+``[httpd_global_handlers]`` section of the CouchDB configuration file
+(typically ``local.ini``). The format is:
+
+.. code-block:: ini
+
+    [httpd_global_handlers]
+    PREFIX = {couch_httpd_proxy, handle_proxy_req, <<"DESTINATION">>}
+
+
+Where:
+
+-  ``PREFIX``
+
+   Is the string that will be matched. The string can be any valid
+   qualifier, although to ensure that existing database names are not
+   overridden by a proxy configuration, you can use an underscore
+   prefix.
+
+-  ``DESTINATION``
+
+   The fully-qualified URL to which the request should be sent. The
+   destination must include the ``http`` prefix. The content is used
+   verbatim in the original request, so you can also forward to servers
+   on different ports and to specific paths on the target host.
+
+The proxy process then translates requests of the form:
+
+.. code-block:: text
+
+    http://couchdb:5984/PREFIX/path
+
+To:
+
+.. code-block:: text
+
+    DESTINATION/path
+
+.. note::
+   Everything after ``PREFIX`` including the required forward slash
+   will be appended to the ``DESTINATION``.
+
+The response is then communicated back to the original client.
+
+For example, the following configuration:
+
+.. code-block:: ini
+
+    _google = {couch_httpd_proxy, handle_proxy_req, <<"http://www.google.com">>}
+
+Would forward all requests for ``http://couchdb:5984/_google`` to the
+Google website.
+
+The service can also be used to forward to related CouchDB services,
+such as Lucene:
+
+.. code-block:: ini
+
+    [httpd_global_handlers]
+    _fti = {couch_httpd_proxy, handle_proxy_req, <<"http://127.0.0.1:5985">>}
+
+.. note::
+   The proxy service is basic. If the request is not identified by the
+   ``DESTINATION``, or the remainder of the ``PATH`` specification is
+   incomplete, the original request URL is interpreted as if the
+   ``PREFIX`` component of that URL does not exist.
+
+   For example, requesting ``http://couchdb:5984/_intranet/media`` when
+   ``/media`` on the proxy destination does not exist, will cause the
+   request URL to be interpreted as ``http://couchdb:5984/media``. Care
+   should be taken to ensure that both requested URLs and destination
+   URLs are able to cope.

http://git-wip-us.apache.org/repos/asf/couchdb/blob/7d1533ee/share/doc/src/http-proxying.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/http-proxying.rst b/share/doc/src/http-proxying.rst
deleted file mode 100644
index cff2404..0000000
--- a/share/doc/src/http-proxying.rst
+++ /dev/null
@@ -1,94 +0,0 @@
-.. Licensed under the Apache License, Version 2.0 (the "License"); you may not
-.. use this file except in compliance with the License. You may obtain a copy of
-.. the License at
-..
-..   http://www.apache.org/licenses/LICENSE-2.0
-..
-.. Unless required by applicable law or agreed to in writing, software
-.. distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-.. WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-.. License for the specific language governing permissions and limitations under
-.. the License.
-
-.. _http-proxying:
-
-HTTP Proxying
-=============
-
-The HTTP proxy feature makes it easy to map and redirect different
-content through your CouchDB URL. The proxy works by mapping a pathname
-and passing all content after that prefix through to the configured
-proxy address.
-
-Configuration of the proxy redirect is handled through the
-``[httpd_global_handlers]`` section of the CouchDB configuration file
-(typically ``local.ini``). The format is:
-
-.. code-block:: ini
-
-    [httpd_global_handlers]
-    PREFIX = {couch_httpd_proxy, handle_proxy_req, <<"DESTINATION">>}
-
-
-Where:
-
--  ``PREFIX``
-
-   Is the string that will be matched. The string can be any valid
-   qualifier, although to ensure that existing database names are not
-   overridden by a proxy configuration, you can use an underscore
-   prefix.
-
--  ``DESTINATION``
-
-   The fully-qualified URL to which the request should be sent. The
-   destination must include the ``http`` prefix. The content is used
-   verbatim in the original request, so you can also forward to servers
-   on different ports and to specific paths on the target host.
-
-The proxy process then translates requests of the form:
-
-.. code-block:: text
-
-    http://couchdb:5984/PREFIX/path
-
-To:
-
-.. code-block:: text
-
-    DESTINATION/path
-
-.. note::
-   Everything after ``PREFIX`` including the required forward slash
-   will be appended to the ``DESTINATION``.
-
-The response is then communicated back to the original client.
-
-For example, the following configuration:
-
-.. code-block:: ini
-
-    _google = {couch_httpd_proxy, handle_proxy_req, <<"http://www.google.com">>}
-
-Would forward all requests for ``http://couchdb:5984/_google`` to the
-Google website.
-
-The service can also be used to forward to related CouchDB services,
-such as Lucene:
-
-.. code-block:: ini
-
-    [httpd_global_handlers]
-    _fti = {couch_httpd_proxy, handle_proxy_req, <<"http://127.0.0.1:5985">>}
-
-.. note::
-   The proxy service is basic. If the request is not identified by the
-   ``DESTINATION``, or the remainder of the ``PATH`` specification is
-   incomplete, the original request URL is interpreted as if the
-   ``PREFIX`` component of that URL does not exist.
-
-   For example, requesting ``http://couchdb:5984/_intranet/media`` when
-   ``/media`` on the proxy destination does not exist, will cause the
-   request URL to be interpreted as ``http://couchdb:5984/media``. Care
-   should be taken to ensure that both requested URLs and destination
-   URLs are able to cope.

http://git-wip-us.apache.org/repos/asf/couchdb/blob/7d1533ee/share/doc/src/index.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/index.rst b/share/doc/src/index.rst
index c8b4749..5ae23ba 100644
--- a/share/doc/src/index.rst
+++ b/share/doc/src/index.rst
@@ -31,7 +31,6 @@ Contents
     api-basics
     pretty_urls
     configuring
-    http-proxying
     config_reference
     replication
     ddocs