-
Notifications
You must be signed in to change notification settings - Fork 6
/
nginx.conf
41 lines (34 loc) · 1.12 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
server {
listen 80;
keepalive_timeout 70;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/.htpasswd;
gzip on;
gzip_disable "msie6";
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
client_max_body_size 500M;
location ~* \.(?:ico|gif|jpe?g|png|swf)$ {
# Some basic cache-control for static files to be sent to the browser
root /deploy;
expires max;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
location / {
root /deploy;
expires 0;
add_header Cache-Control private;
sendfile off;
}
location /uploader {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header Port $server_port;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off;
rewrite ^/uploader/(.*) /$1 break;
proxy_pass http://localhost:8888;
}
}