couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joan Touzet <woh...@apache.org>
Subject Re: httpd reverse-proxy reply 502 bad gateway
Date Mon, 12 Dec 2016 18:03:49 GMT
Try changing

localhost:5984

to

127.0.0.1:5984

in your Apache configuration.

The fail message from your Apache proxy suggests it is trying to
bind to an IPv6 localhost address, and I'm not 100% convinced this
works with CouchDB.

-Joan

----- Original Message -----
> From: "max" <maxima078@gmail.com>
> To: user@couchdb.apache.org
> Sent: Monday, December 12, 2016 8:33:53 AM
> Subject: Re: httpd reverse-proxy reply 502 bad gateway
> 
> Sorry for double,
> 
> I forgot to write httpd log :
> 
> 
> [Mon Dec 12 14:24:08 2016] [error] (103)Software caused connection
> abort:
> proxy: pass request body failed to [::1]:5984 (localhost)
> [Mon Dec 12 14:24:08 2016] [error] proxy: pass request body failed to
> [::1]:5984 (localhost) from x.x.x.x ()
> 
> x.x.x.x being my public IP.
> 
> 2016-12-12 14:16 GMT+01:00 max <maxima078@gmail.com>:
> 
> > Hi,
> >
> > I'm facing a 502 bad gateway error from my httpd proxy.
> > My use case is pretty simple, just PUT an image as attachment
> > twice. Then
> > the second request is facing a revision conflict but I get the 502
> > error
> > instead of a JSON error response.
> >
> > The request I use :
> >
> > PUT
> > /database0/document0/tmpImage.jpg?rev=8-b5b4327c77aea245cf04c9e7ef830046
> > HTTP/1.1
> > // 1st response is a json ok response
> > PUT
> > /database0/document0/tmpImage.jpg?rev=8-b5b4327c77aea245cf04c9e7ef830046
> > HTTP/1.1
> > // 2nd response is 502 bad gateway html file
> >
> > To set up my proxy I used https://wiki.apache.org/
> > couchdb/Apache_As_a_Reverse_Proxy
> >
> > You can see my httpd conf below.
> > Thanks for any hints.
> >
> > CouchDB 1.4.
> > CentOS 6
> >
> > httpd.conf :
> >
> >         AllowEncodedSlashes On
> > ProxyRequests Off
> > <Proxy *>
> >            Order Allow,Deny
> >            Allow from all
> >          </Proxy>
> >
> > ServerName servtest.com
> > ProxyPass / http://localhost:5984/ nocanon
> > ProxyPassReverse / http://localhost:5984/
> >
> > ssl.conf :
> >
> >         AllowEncodedSlashes On
> > ProxyRequests Off
> > <Proxy *>
> >            Order Allow,Deny
> >            Allow from all
> >          </Proxy>
> >
> > ServerName servtest.com
> > ProxyPass / http://localhost:5984/ nocanon
> > ProxyPassReverse / http://localhost.com:5984/
> > SSLEngine on
> > SSLProtocol all -SSLv2
> > SSLCertificateFile /etc/httpd/certs/servtest.crt
> > SSLCertificateKeyFile /etc/httpd/certs/servtest.key
> > SSLCertificateChainFile /etc/httpd/certs/DigiCertCA.crt
> >
> >
> > Max
> >
> 

Mime
View raw message