Skip to content

Instantly share code, notes, and snippets.

@mikitebeka
Created May 26, 2010 23:34
Show Gist options
  • Select an option

  • Save mikitebeka/415224 to your computer and use it in GitHub Desktop.

Select an option

Save mikitebeka/415224 to your computer and use it in GitHub Desktop.
server {
listen 4433;
server_name localhost;
location / {
proxy_pass http://localhost:5984;
proxy_intercept_errors on;
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;
error_page 404 = @fallback;
}
location @fallback {
proxy_pass http://localhost:5983;
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;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment