-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
59 lines (48 loc) · 1.32 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
# user www www; ## Default: nobody
worker_processes 1; ## Default: 1
error_log /tmp/error.log;
pid /run/nginx.pid;
worker_rlimit_nofile 8192;
events {
worker_connections 4096; ## Default: 1024
}
http {
# include conf/mime.types;
# include /etc/nginx/proxy.conf;
# include /etc/nginx/fastcgi.conf;
index index.html index.htm index.php;
default_type application/octet-stream;
log_format main '$remote_addr [$time_local] $status '
'"$request" $body_bytes_sent ';
access_log /tmp/access.log;
sendfile on;
tcp_nopush on;
server_names_hash_bucket_size 128; # this seems to be required for some vhosts
upstream node_server {
server 127.0.0.1:8000;
}
server {
listen 80;
# http://nginx.org/en/docs/http/ngx_http_core_module.html#if_modified_since
# for nginx server
# if_modified_since exact;
# etag off;
# for client
expires 30d;
location = / {
return 301 /index.html;
}
location = /index.html {
root /example/static;
expires 10s;
}
location /static/ {
root /example/;
expires 10s;
autoindex on;
}
location /ws {
proxy_pass http://node_server;
}
}
}