incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <rnew...@apache.org>
Subject Re: rewrites not working
Date Tue, 12 Nov 2013 11:33:05 GMT
typically, only root can bind to ports under 1024 and couchdb runs,
and should run, as not-root.

B.


On 12 November 2013 10:27, Alexander Gabriel <alex@barbalex.ch> wrote:
> Hi Jim
>
> I had some trouble configuring my local.ini file.
>
> Setting
>
> [httpd]
> port = 80
>
> doesn't work because I get a "Connection refused" answer when connecting
> with curl.
>
> The only way I got it working was:
>
> [httpd]
> port = 5984
> bind_address = 0.0.0.0
>
> then redirecting form 5984 to 80: "iptables -t nat -A PREROUTING -p tcp
> --dport 80 -j REDIRECT --to-ports 5984"
>
> Is this the reason form my trouble with rewrites?
>
> The vhost I set was: arteigenschaften.ch:5984 =
> /artendb/_design/artendb/_rewrite
>
> Alex
>
>
> 2013/11/11 Jim Klo <jim.klo@sri.com>
>
>> Couple of issues I see, answered inline below.
>>
>> Jim Klo
>> Senior Software Engineer
>> SRI International
>> t: @nsomnac
>>
>> On Nov 10, 2013, at 8:38 PM, "Alexander Gabriel" <alex@barbalex.ch<mailto:
>> alex@barbalex.ch>> wrote:
>>
>> I call:
>> "http://arteigenschaften.ch/artendb/_design/artendb/index.html" because
>> that is where the web-app appears. And I would want it to show as "
>> http://arteigenschaften.ch/index.html<
>> http://arteigenschaften.ch/artendb/_design/artendb/index.html>
>>
>> Is your VHOST mapping right?
>>
>> I saw you had:
>> arteigenschaften.ch<http://arteigenschaften.ch>:5984=/db
>> name/_design/docname/_rewrite
>>
>> If you want it to answer on port 80, I think you either need to omit the
>> port or specify 80
>>
>> arteigenschaften.ch<http://arteigenschaften.ch>=/db
>> name/_design/docname/_rewrite
>>
>> You should be able to test your rewrites by just going to:
>> http://localhost:5984/artendb/_design/artendb/_rewrite
>>
>> It that works, then your problem is with your VHOST config (or reverse
>> proxy depending upon how things are configured in your environment). If
>> you're doing this remotely and can't access couch directly, I recommend
>> doing a ssh port forward so you can test the redirect without VHOST mucking
>> things up.
>>
>> - JK
>>
>>

Mime
View raw message