forked from torusresearch/solana-wallet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
62 lines (53 loc) · 1.77 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 root;
worker_processes 2;
error_log /var/log/nginx/error.log notice;
pid /run/nginx.pid;
worker_rlimit_nofile 65535;
events {
use epoll;
worker_connections 65535;
}
http {
log_format main '$server_name $remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" '
'$ssl_protocol $ssl_cipher $upstream_addr $request_time $upstream_response_time';
access_log /var/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 60;
types_hash_max_size 2048;
gzip off;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_proxied any;
gzip_vary off;
gzip_comp_level 3;
gzip_types text/plain text/css application/x-javascript text/xml application/xml
application/xml+rss text/javascript application/json application/javascript;
gzip_disable "MSIE [1-6]\.";
include /etc/nginx/mime.types;
default_type application/octet-stream;
server {
listen 80;
server_name localhost;
location / {
root /app;
index index.html index.htm;
try_files $uri $uri/ /index.html;
add_header Cross-Origin-embedder-policy require-corp;
if ($request_filename ~* ^.*?.(html|htm)$) {
add_header Cache-Control "no-store";
}
if ($request_filename ~* ^.*?.(css|js)$) {
expires 30d;
add_header cache-control "public, max-age=30000001";
}
if ($request_filename ~* ^.*?.(gif|jpg|jpeg|png|bmp|swf|ttf|woff|otf|ttc|wasm|svg|json|ico)$) {
expires 90d;
add_header cache-control "public, max-age=30000001";
}
}
}
}