You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by Apache Wiki <wi...@apache.org> on 2009/06/22 10:01:01 UTC

[Couchdb Wiki] Update of "Nginx As a Reverse Proxy" by StefanSaasen

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 StefanSaasen:
http://wiki.apache.org/couchdb/Nginx_As_a_Reverse_Proxy

------------------------------------------------------------------------------
  
  Note: As an Nginx newbie, it's probable that the original author of this wiki post just didn't know which headers to suppress or how to suppress them :-) I tried "proxy_hide_header Authorization" and "proxy_hide_header WWW-Authenticate".
  
+ 
+ Note 2: While "proxy_hide_header" does not work, setting the header Authorization to "" seems to work.
+ 
+ {{{
+   location / {
+     auth_basic            "CouchDB Admin";
+     auth_basic_user_file  /etc/nginx/passwd;
+     proxy_pass http://localhost:5984;
+     proxy_redirect off;
+     proxy_set_header Host $host;
+     proxy_set_header X-Real-IP $remote_addr;
+     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+     proxy_set_header Authorization "";
+   }
+ }}}
+