-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
47 lines (40 loc) · 1.13 KB
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
server {
# listen on port 80
listen 80;
root /usr/share/nginx/html;
index index.html index.htm;
access_log /var/log/nginx/c-labbook.access.log;
error_log /var/log/nginx/c-labbook.error.log;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location / {
# First attempt to serve request as file, then as directory,
# then fall back to /index.html
try_files $uri $uri/ =404;
expires epoch;
}
# Javascript and CSS files
location /static/ {
try_files $uri =404;
expires 1y;
# access_log off;
# add_header Cache-Control "public";
}
location /c-service {
rewrite /c-service/(.*) /$1 break;
proxy_pass http://localhost:5984;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /_session {
proxy_pass http://localhost:5984/_session;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}