Dear Wiki user, You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.
The following page has been changed by CurtArnold: http://wiki.apache.org/couchdb/Apache_As_a_Reverse_Proxy ------------------------------------------------------------------------------ Note from Rune Larsen: On linux Apache 2.2.10 you must use nocanon - otherwise many tests fail. + == Apache Reverse Proxy for same origin and authentication == + + Browsers will typically enforce the same origin policy and will reject requests to fetch data unless the protocol, port and host are identical to the source of the current page. Using a reverse proxy allows browser-hosted applications to access CouchDB while conforming to the same origin policy. + + + The following snippet will: + + * Require validation of all users, checking username and password against the contents of /var/auth/digest_pw. + * Forward any requests that start with /db/ to CouchDB. + * Add user=username to the list of parameters to any request to CouchDB for use with a custom authentication_handler. + + + {{{ + <VirtualHost *:80> + ServerAdmin webmas...@localhost + ... + + <Location /> + AuthType Digest + AuthName "CouchDB" + AuthDigestDomain / + AuthDigestProvider file + AuthUserFile /var/auth/digest_pw + Require valid-user + </Location> + + BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On + + ProxyRequests Off + <Proxy *> + Order Allow,Deny + Allow from all + </Proxy> + + + RewriteEngine On + RewriteOptions Inherit + + RewriteRule ^/db/(.*) http://127.0.0.1:5984/$1?user=%{LA-U:REMOTE_USER} [QSA,P] + + </VirtualHost> + + + }}} +
