incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Leonardi <david.leona...@gmail.com>
Subject Re: Apache CouchDB Reverse Proxy
Date Fri, 30 Jan 2009 18:52:46 GMT
This is what i have ATM.

proxying works fine, but ALL tests fail.

When i connect to domain.domain.tld, as expected, i get :
{"couchdb":"Welcome","version":"0.9.0a736876-incubating"}

am using apache 2.2.11 .

one thing i noticed using futon, is that the loading spinner in the
top keeps spinning and never stops.

Also, when running any test, it seems to go and look for the json data
on domain.tld , instead of domain.tld/db/ .  I see the html page
sitting at that addy in the error message itself.

Any advice?

Here is my virtualhost config:

<VirtualHost *:80>
   ServerAdmin admin@domain.tld
   DocumentRoot "/srv/www/dummy"
   ServerName domain.com
   ServerAlias www.domain.com
   AllowEncodedSlashes On
   ProxyRequests Off
   KeepAlive Off
   <Proxy *>
      Order allow,deny
          Allow from all
      </Proxy>
   ProxyPass /db/ http://127.0.0.1:1234/ nocanon << couchdb
   ProxyPassReverse /db/ http://127.0.0.1:1234/  << couchdb
   ProxyPass / http://domain.domain.tld/ << an apache virtualhost
   ProxypassReverse / http://domain.domain.tld/ << an apache virtualhost
   ErrorLog "/var/log/apache2/couchdb.localhost-error_log"
   CustomLog "/var/log/apache2/couchdb.localhost-access_log" common
</VirtualHost>


On Fri, Jan 30, 2009 at 4:53 PM, Patrick Antivackis
<patrick.antivackis@gmail.com> wrote:
> Adam,
>
> Ok suppose you have couchdb located on
> http://mycouchdbserver:port_it_is_listening_to
>
> so today you access it without proxy at :
> http://mycouchdbserver:port_it_is_listening_to/_utils
>
>
> You have your apache rever proxy at
> http://my_apache_reverse_proxy
>
> In the configuration you write :
> ServerName my_apache_reverse_proxy
>
> ProxyPass / http://mycouchdbserver:port_it_is_listening_to/<http://localhost:5984/>nocanon
> ProxyPassReverse /
> http://mycouchdbserver:port_it_is_listening_to/<http://localhost:5984/>
>
> for securioty purpose you want no security  so :
>  <Proxy *>
>     Order allow,deny
>     Allow from all
>  </Proxy>
>
> That should make it
>
> 2009/1/30 Adam Petty <adamjpetty@gmail.com>
>
>> Patrick,
>>
>> Thanks for the quick response!
>>
>> So the reverse proxy section - should that replace my "default" file in
>> sites-available - or be a new site?
>>
>>
>> <VirtualHost *:80>
>>   ServerAdmin webmaster@dummy-host.example.com
>>   DocumentRoot "/opt/websites/web/www/dummy"
>>                        (I'm assuming this is just a generic site root
>> - doesn't matter here?)
>>   ServerName couchdb.localhost
>>                          (can this be the external server ? )
>>   AllowEncodedSlashes On
>>   ProxyRequests Off
>>   KeepAlive Off
>>   <Proxy *>
>>      Order deny,allow
>>      Deny from all
>>      Allow from 127.0.0.1
>>   </Proxy>
>>   ProxyPass / http://localhost:5984/ nocanon
>>   ProxyPassReverse / http://localhost:5984/
>>   ErrorLog "logs/couchdb.localhost-error_log"
>>   CustomLog "logs/couchdb.localhost-access_log" common
>> </VirtualHost>
>>
>> I guess I'm not seeing how to set Apache up to point to an external
>> physical
>> couchdb/webserver (but in the local domain), or if Apache is local also -
>> how does Apache get the call of "http://localhost:5984/"  vs. mochiweb?
>>
>> Anyway - any more info here would help me out alot.  Again - I know these
>> are probably rudimentary questions....
>>
>>
>>
>>
>> On Fri, Jan 30, 2009 at 9:56 AM, Patrick Antivackis <
>> patrick.antivackis@gmail.com> wrote:
>>
>> > Hi Adam,
>> > If i well understand, you want to access couchdb via a url like
>> > http://localhost/couchdb , through a reverse proxy.
>> > Ithink it will not work as some futons javascript are calling absolute
>> uri,
>> > so the js will send to the reverse proxy an url like :
>> > http://localhost/couchdbname/..... that will not be caught by the
>> reverse
>> > proxy and so not passed to couchdb
>> >
>> > Patrick
>> >
>> >
>> >
>> > 2009/1/30 Adam Petty <adamjpetty@gmail.com>
>> >
>> > > Hey all,
>> > >
>> > > I'm new to both CouchDB and Apache and have been looking everywhere for
>> > > tutorials on Reverse Proxy-ing and Couch, and can't seem to get to
>> where
>> > I
>> > > need to be.
>> > >
>> > > I checked out the page
>> > > http://wiki.apache.org/couchdb/Apache_As_a_Reverse_Proxy
>> > >
>> > > But that doesn't make sense to me as I don't see where I could alter
>> the
>> > > site file to set an alias to "http://localhost:5984/" to "
>> > > http://localhost/couch" which then is proxied to the former.  Also
>> > >
>> > > I tried
>> > > http://qooxdoo.org/contrib/project/couchdb
>> > > but so far, that just gets me a new "couch" site - but proxying isn't
>> > > working.
>> > >
>> > > Looking everywhere - everyone has a different approach for Reverse
>> > > Proxy-ing
>> > > - and most at the Ubuntu Forums say to set "Allow All" to true in the
>> > > proxy.conf file - which I KNOW has to be bad.
>> > >
>> > > The Apache site talks about <Location> settings - but as its far
and
>> away
>> > > the most different and seemingly complicated - I wasn't sure where to
>> > start
>> > > for that one.
>> > >
>> > > Any help or links other than the above would be most appreciated.
>> > >
>> > > Thanks,
>> > >
>> > > --Adam
>> > >
>> >
>>
>

Mime
View raw message