forked from midas-research/audino
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
84 lines (69 loc) · 1.94 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
worker_processes auto;
events {
worker_connections 8000;
multi_accept on;
}
http {
server_tokens off;
gzip on;
gunzip on;
gzip_http_version 1.0;
gzip_comp_level 5;
gzip_min_length 1000;
gzip_proxied any;
gzip_vary on;
gzip_types
text/plain
text/css
text/js
text/xml
text/javascript
application/javascript
application/json
application/xml
application/rss+xml
image/svg+xml
audio/x-wav;
include /etc/nginx/mime.types;
default_type application/octet-stream;
server {
listen 80;
charset utf-8;
client_max_body_size 1024m;
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
root /var/www/html;
index index.html index.htm;
location / {
try_files $uri $uri/ /index.html;
}
location /api/ {
proxy_pass https://backend:5000/api/;
proxy_redirect off;
proxy_read_timeout 300;
}
location /auth/ {
proxy_pass https://backend:5000/auth/;
proxy_redirect off;
proxy_read_timeout 300;
}
location /audios/ {
proxy_pass https://backend:5000/audios/;
proxy_redirect off;
proxy_read_timeout 300;
}
location ~* ^.+\.(?:css|cur|js|jpe?g|gif|htc|ico|png|html|xml|otf|ttf|eot|woff|woff2|svg)$ {
access_log off;
expires 30d;
add_header Cache-Control public;
tcp_nodelay off;
open_file_cache max=3000 inactive=120s;
open_file_cache_valid 45s;
open_file_cache_min_uses 2;
open_file_cache_errors off;
}
}
}