-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
31 lines (29 loc) · 1 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
# Redirect to HTTPS
server {
listen 80;
server_name localhost;
return 301 https://$host$request_uri;
}
# Act as a proxy for port 8080
server {
listen 8485 ssl http2; # HTTP/2 is only possible when using SSL
server_name localhost;
ssl_certificate /etc/ssl/certs/nginx.crt;
ssl_certificate_key /etc/ssl/private/nginx.key;
client_max_body_size 1024M;
location / {
proxy_pass http://127.0.0.1:8080/;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_send_timeout 6000s; # 100 minutes
proxy_read_timeout 6000s; # 100 minutes
#proxy_next_upstream_timeout 0; # no timeout
#proxy_cache cache;
#proxy_cache_bypass $cookie_auth_tkt;
#proxy_no_cache $cookie_auth_tkt;
#proxy_cache_valid 30m;
#proxy_cache_key $host$scheme$proxy_host$request_uri;
# In emergency comment out line to force caching
# proxy_ignore_headers X-Accel-Expires Expires Cache-Control;
}
}