-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
43 lines (40 loc) · 1.27 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
user nginx;
worker_processes auto;
daemon off;
error_log stderr info;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
access_log stdout;
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"';
sendfile on;
keepalive_timeout 3540;
gzip on;
server {
listen 8080;
listen [::]:8080;
http2 on;
server_name localhost;
# Set maximum allowed request size
client_max_body_size 2g;
location / {
proxy_pass http://localhost:8081;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header X-NginX-Proxy true;
proxy_redirect off;
proxy_next_upstream error timeout http_502 http_503 http_504;
proxy_next_upstream_tries 5;
proxy_connect_timeout 3540s;
proxy_send_timeout 3540s;
proxy_read_timeout 3540s;
}
}
}