Ubuntu 10.04.1でApache Webserver 2.2.14を介してプロキシを実現したいと考えています。Couchdb 1.0.1のCouchappの場合、私はそれを経験していません。プロキシは、別のcouchdb-databaseおよびApacheのwww-path内の他のパスにもリダイレクトする必要があります。ターゲットは、sub.something.de で Couchapp (index.html) を呼び出すことです。
私の質問は次のとおりです。
- それは機能しますが、それを行うためのよりスマートな方法はありますか? 私自身の方法は、回避策のように見えます。
- 問題は、couchdb-api でログアウトすると、Apache からログインするための別のダイアログが表示されることです。ログイン後、ログアウトできます ;) 問題は、ログアウトを要求する uri が _:_@sub.something.de のように見え、これがプロキシ構成と一致しないことです。解決策は何ですか?
ここに私の httpd.conf 設定があります:
<VirtualHost *:80>
DocumentRoot "/var/www/Something"
ServerName something
ServerAlias sub.something.de
AllowEncodedSlashes On
ProxyRequests Off
ProxyPreserveHost Off
ProxyVia On
KeepAlive Off
<Proxy *>
AuthType Basic
AuthName "Something Login"
AuthUserFile /home/user/.couchdb_htpasswd
Require valid-user
Order deny,allow
Deny from all
Allow from 127.0.0.1
Satisfy Any
</Proxy>
ProxyPass /something_data http://localhost:5984/something_data/ nocanon
ProxyPass /data http://localhost:5984/something/_design/prototype/data nocanon
ProxyPass /css http://localhost:5984/something/_design/prototype/css nocanon
ProxyPass /vendor http://localhost:5984/something/_design/prototype/vendor nocanon
ProxyPass /js http://localhost:5984/something/_design/prototype/js nocanon
ProxyPass /font http://localhost:5984/something/_design/prototype/font nocanon
ProxyPass /php http://localhost/dev/something/php nocanon
ProxyPass /uploads http://localhost/dev/something/uploads nocanon
ProxyPass /_uuids http://localhost:5984/_uuids nocanon
ProxyPass /_session http://localhost:5984/_session nocanon
ProxyPass /_users http://localhost:5984/_users nocanon
ProxyPass /_users !
ProxyPass /_uuids !
ProxyPass /_session !
ProxyPass /php !
ProxyPass /uploads !
ProxyPass /font !
ProxyPass /data !
ProxyPass /css !
ProxyPass /vendor !
ProxyPass /js !
ProxyPass /something_data !
ProxyPass / http://localhost:5984/something/_design/prototype/index.html nocanon
ProxyPassReverse / http://localhost:5984/something/_design/prototype/
RequestHeader unset Authorization
ErrorLog "/home/user/logs/couchdb_error_log"
CustomLog "/home/user/logs/couchdb_access_log" common
</VirtualHost>
どうも