-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathnginx.conf
62 lines (42 loc) · 1.34 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
user nginx;
daemon off;
worker_processes auto;
worker_rlimit_nofile 8192;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 8000;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
keepalive_timeout 65;
tcp_nopush on;
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
map $server_port $proxy_x_forwarded_port {
"8080" "80";
"8443" "443";
}
include /etc/nginx/resolvers.conf;
# upstream.d/api-gateway.conf defines upstreams for DeviceHive services: Frontend, Auth, Plugin, etc.
include /etc/nginx/upstream.d/*.conf;
server {
listen 8080;
# Also listens on 8443 if certificates are provided:
include /etc/nginx/server.d/*.conf;
port_in_redirect off;
# location.d/api-gateway.conf implements API Gateway for DeviceHive services
include /etc/nginx/location.d/*.conf;
}
}
stream {
include /etc/nginx/stream.d/*.conf;
}