-
Notifications
You must be signed in to change notification settings - Fork 27
/
nginx.conf
38 lines (31 loc) · 917 Bytes
/
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
worker_processes 5;
daemon off;
error_log /var/log/nginx/error.log;
pid /var/log/nginx/nginx.pid;
worker_rlimit_nofile 8192;
events {
worker_connections 4096;
}
http {
include /opt/nginx/conf/mime.types;
index index.html index.htm index.php;
upstream ethereum {
server ETHEREUM_CLIENT_IP:8545;
}
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] $status '
'"$request" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
server {
listen 8080;
server_name localhost;
location / {
set $jsonrpc_whitelist 'eth_getTransactionByHash,eth_getTransactionReceipt,eth_sendRawTransaction';
access_by_lua_file 'eth-jsonrpc-access.lua';
proxy_pass http://ethereum;
}
}
}