forked from redislabs-training/redis-sitesearch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
44 lines (36 loc) · 1.02 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
worker_processes 1;
pid /var/run/nginx.pid;
# To turn on error logging, set to:
# error_log stderr;
error_log off;
events {
worker_connections 2048;
use epoll;
}
http {
log_format origin '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_origin" "$http_user_agent"';
# To enable, set to:
# access_log stderr origin;
access_log off;
upstream app_server {
server localhost:8081 fail_timeout=0;
}
server {
listen 8080 deferred;
client_max_body_size 1G;
keepalive_timeout 5;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_read_timeout 10s;
proxy_connect_timeout 10s;
# we don't want nginx trying to do something clever with
# redirects, we set the Host: header above already.
proxy_redirect off;
proxy_pass http://app_server;
}
}
}