forked from random-zebra/PIVX-NGINX_proxy
-
Notifications
You must be signed in to change notification settings - Fork 3
/
nginx.conf
61 lines (47 loc) · 1.68 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
worker_rlimit_nofile 65535;
worker_processes 4; # Set based on available cores
error_log logs/error.log debug;
pid logs/nginx.pid;
events {
worker_connections 4096; # Set ~ 1024 * worker_processes
}
http {
include /usr/local/openresty/nginx/conf/mime.types;
index index.html index.htm index.php;
server_tokens off;
upstream pivx {
server 127.0.0.1:51473;
}
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 logs/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 600s;
client_body_buffer_size 200m;
server {
listen 8080;
server_name _; # Set hostname
ssl on;
ssl_certificate fullchain.pem;
ssl_certificate_key privkey.pem;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
add_header Allow "POST" always;
if ( $request_method !~ ^(POST)$ ) {
return 405;
}
location / {
set $jsonrpc_whitelist 'decodemasternodebroadcast,decoderawtransaction,getblockcount,getblockhash,getbudgetinfo,getbudgetprojection,getbudgetvotes,getfeeinfo,getinfo,getmasternodecount,getnextsuperblock,getrawtransaction,listmasternodes,mnbudgetrawvote,mnsync,relaymasternodebroadcast,sendrawtransaction';
access_by_lua_file 'conf/pivx-jsonrpc-access.lua';
auth_basic "Restricted";
auth_basic_user_file '.htpasswd';
proxy_set_header Authorization "Basic xxxxxxxxx==";
proxy_pass http://pivx;
}
}
}