flimzy commented on a change in pull request #272: Add nginx docs

 File path: src/best-practices/nginx.rst
 @@ -0,0 +1,134 @@
+.. 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 
+.. 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 
+.. the License.
+.. _best-practices/nginx:
+nginx as a Reverse Proxy
+CouchDB recommends the use of `HAProxy`_ as a load balancer and reverse proxy.
+The team's experience with using it in production has shown it to be superior
+for configuration and montioring capabilities, as well as overall performance.
+CouchDB's sample haproxy configuration is present in the `code repository`_ and
+release tarball as ``rel/haproxy.cfg``.
+However, ``nginx`` is a suitable alternative. Below are instructions on
+configuring nginx appropriately.
+.. _HAProxy: http://haproxy.org/
+.. _code repository: 
+Basic configuration
+Here's a basic excerpt from an nginx config file in
+``<nginx config directory>/sites-available/default``. This will proxy all
+requests from ``http://domain.com/...`` to ``http://localhost:5984/...``
+.. code-block:: text
+    location / {
+        proxy_pass http://localhost:5984;
+        proxy_redirect off;
+        proxy_set_header Host $host;
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+    }
+Continuous Replication through nginx
 Review comment:
   I don't think "Replication" needs to be capitalized to be more consistent

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

Reply via email to