-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsite.conf
36 lines (29 loc) · 884 Bytes
/
site.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
worker_processes 4;
events {
worker_connections 1024;
}
http {
server {
listen 80 http2;
listen [::]:80 http2;
root /var/www/poll/html;
# logging
access_log off;
error_log /var/log/nginx/error.log warn;
# index.html fallback
location / {
try_files $uri $uri/ /index.html;
}
# reverse proxy
location /api {
proxy_pass http://api:3081/api;
# Proxy headers
proxy_http_version 1.1;
proxy_set_header X-Real-IP $remote_addr;
# Proxy timeouts
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;
}
}
}