Skip to content

Instantly share code, notes, and snippets.

@yyolk
Last active December 21, 2015 15:28
Show Gist options
  • Save yyolk/6326578 to your computer and use it in GitHub Desktop.
Save yyolk/6326578 to your computer and use it in GitHub Desktop.
nginx couchdb proxy include
access_log /var/log/nginx/couchdb.access.log;
error_log /var/log/nginx/couchdb.error.log;
location / {
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 X-NginX-Proxy true;
proxy_pass http://127.0.0.1:5984/;
proxy_redirect off;
proxy_buffering off;
}
user html;
worker_processes 1;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
# multi_accept on;
}
http {
include /etc/nginx/mime.types;
access_log /var/log/nginx/access.log;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
tcp_nodelay on;
gzip on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
server {
listen 0.0.0.0:80;
client_max_body_size 12M;
include /etc/nginx/include/couchdb-proxy;
}
server {
listen 0.0.0.0:443;
include /etc/nginx/include/ssl;
include /etc/nginx/include/couchdb-proxy;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment