mirror of
https://github.com/mempool/mempool.git
synced 2025-01-03 20:24:28 +01:00
302 lines
8.3 KiB
Nginx Configuration File
302 lines
8.3 KiB
Nginx Configuration File
user nobody;
|
|
pid /var/run/nginx.pid;
|
|
|
|
worker_processes auto;
|
|
worker_rlimit_nofile 100000;
|
|
|
|
events {
|
|
worker_connections 9000;
|
|
multi_accept on;
|
|
}
|
|
|
|
http {
|
|
sendfile on;
|
|
tcp_nopush on;
|
|
tcp_nodelay on;
|
|
|
|
server_tokens off;
|
|
server_name_in_redirect off;
|
|
|
|
include /usr/local/etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
access_log /var/log/nginx/access.log;
|
|
error_log /var/log/nginx/error.log;
|
|
|
|
# reset timed out connections freeing ram
|
|
reset_timedout_connection on;
|
|
# maximum time between packets the client can pause when sending nginx any data
|
|
client_body_timeout 10s;
|
|
# maximum time the client has to send the entire header to nginx
|
|
client_header_timeout 10s;
|
|
# timeout which a single keep-alive client connection will stay open
|
|
keepalive_timeout 69s;
|
|
# maximum time between packets nginx is allowed to pause when sending the client data
|
|
send_timeout 10s;
|
|
|
|
# number of requests per connection, does not affect SPDY
|
|
keepalive_requests 100;
|
|
|
|
# enable gzip compression
|
|
gzip on;
|
|
gzip_vary on;
|
|
gzip_comp_level 6;
|
|
gzip_min_length 1000;
|
|
gzip_proxied expired no-cache no-store private auth;
|
|
# text/html is always compressed by gzip module
|
|
gzip_types application/javascript application/json application/ld+json application/manifest+json application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard;
|
|
|
|
# limit request body size
|
|
client_max_body_size 10m;
|
|
|
|
# proxy cache
|
|
proxy_cache off;
|
|
proxy_cache_path /var/cache/nginx/services keys_zone=services:20m levels=1:2 inactive=600s max_size=100m;
|
|
proxy_cache_path /var/cache/nginx/markets keys_zone=markets:20m levels=1:2 inactive=600s max_size=100m;
|
|
proxy_cache_path /var/cache/nginx/mainnet keys_zone=mainnet:20m levels=1:2 inactive=600s max_size=100m;
|
|
proxy_cache_path /var/cache/nginx/testnet keys_zone=testnet:20m levels=1:2 inactive=600s max_size=100m;
|
|
proxy_cache_path /var/cache/nginx/liquid keys_zone=liquid:20m levels=1:2 inactive=600s max_size=100m;
|
|
proxy_cache_path /var/cache/nginx/signet keys_zone=signet:20m levels=1:2 inactive=600s max_size=100m;
|
|
types_hash_max_size 2048;
|
|
|
|
map $http_accept_language $header_lang {
|
|
default en-US;
|
|
~*^en-US en-US;
|
|
~*^en en-US;
|
|
~*^ar ar;
|
|
~*^cs cs;
|
|
~*^de de;
|
|
~*^es es;
|
|
~*^fa fa;
|
|
~*^fr fr;
|
|
~*^ko ko;
|
|
~*^hi hi;
|
|
~*^it it;
|
|
~*^ka ka;
|
|
~*^hu hu;
|
|
~*^nl nl;
|
|
~*^ja ja;
|
|
~*^nb nb;
|
|
~*^pl pl;
|
|
~*^pt pt;
|
|
~*^sl sl;
|
|
~*^fi fi;
|
|
~*^sv sv;
|
|
~*^tr tr;
|
|
~*^uk uk;
|
|
~*^vi vi;
|
|
~*^zh zh;
|
|
}
|
|
|
|
map $cookie_lang $lang {
|
|
default $header_lang;
|
|
~*^en-US en-US;
|
|
~*^en en-US;
|
|
~*^ar ar;
|
|
~*^cs cs;
|
|
~*^de de;
|
|
~*^es es;
|
|
~*^fa fa;
|
|
~*^fr fr;
|
|
~*^hi hi;
|
|
~*^it it;
|
|
~*^ka ka;
|
|
~*^hu hu;
|
|
~*^ja ja;
|
|
~*^ko ko;
|
|
~*^nb nb;
|
|
~*^nl nl;
|
|
~*^pl pl;
|
|
~*^pt pt;
|
|
~*^sl sl;
|
|
~*^fi fi;
|
|
~*^sv sv;
|
|
~*^tr tr;
|
|
~*^uk uk;
|
|
~*^vi vi;
|
|
~*^zh zh;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name node206.mempool.space mempool.space mempool.ninja bisq.markets liquid.network;
|
|
|
|
if ($host = mempool.space)
|
|
{
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
if ($host = mempool.ninja)
|
|
{
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
if ($host = bisq.markets)
|
|
{
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
if ($host = liquid.network)
|
|
{
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
if ($host = node206.mempool.space)
|
|
{
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
return 503;
|
|
}
|
|
|
|
upstream electrs-mainnet {
|
|
server [2401:b140:1::92:201]:3000 backup;
|
|
server [2401:b140:1::92:202]:3000 backup;
|
|
server [2401:b140:1::92:203]:3000 weight=1 fail_timeout=10s max_fails=10;
|
|
server [2401:b140:1::92:204]:3000 weight=1 fail_timeout=10s max_fails=10;
|
|
server [2401:b140:1::92:205]:3000 weight=1 fail_timeout=10s max_fails=10;
|
|
server [2401:b140:1::92:206]:3000 weight=9999 fail_timeout=10s max_fails=10;
|
|
}
|
|
server {
|
|
listen 127.0.0.1:4000;
|
|
access_log /dev/null;
|
|
location / {
|
|
proxy_pass http://electrs-mainnet;
|
|
}
|
|
}
|
|
|
|
upstream electrs-liquid {
|
|
server [2401:b140:1::92:201]:3001 backup;
|
|
server [2401:b140:1::92:202]:3001 backup;
|
|
server [2401:b140:1::92:203]:3001 weight=1 fail_timeout=10s max_fails=10;
|
|
server [2401:b140:1::92:204]:3001 weight=1 fail_timeout=10s max_fails=10;
|
|
server [2401:b140:1::92:205]:3001 weight=1 fail_timeout=10s max_fails=10;
|
|
server [2401:b140:1::92:206]:3001 weight=9999 fail_timeout=10s max_fails=10;
|
|
}
|
|
server {
|
|
listen 127.0.0.1:4001;
|
|
access_log /dev/null;
|
|
location / {
|
|
proxy_pass http://electrs-liquid;
|
|
}
|
|
}
|
|
|
|
upstream electrs-testnet {
|
|
server [2401:b140:1::92:201]:3002 backup;
|
|
server [2401:b140:1::92:202]:3002 backup;
|
|
server [2401:b140:1::92:203]:3002 weight=1 fail_timeout=10s max_fails=10;
|
|
server [2401:b140:1::92:204]:3002 weight=1 fail_timeout=10s max_fails=10;
|
|
server [2401:b140:1::92:205]:3002 weight=1 fail_timeout=10s max_fails=10;
|
|
server [2401:b140:1::92:206]:3002 weight=9999 fail_timeout=10s max_fails=10;
|
|
}
|
|
server {
|
|
listen 127.0.0.1:4002;
|
|
access_log /dev/null;
|
|
location / {
|
|
proxy_pass http://electrs-testnet;
|
|
}
|
|
}
|
|
|
|
upstream electrs-signet {
|
|
server [2401:b140:1::92:201]:3003 backup;
|
|
server [2401:b140:1::92:202]:3003 backup;
|
|
server [2401:b140:1::92:203]:3003 weight=1 fail_timeout=10s max_fails=10;
|
|
server [2401:b140:1::92:204]:3003 weight=1 fail_timeout=10s max_fails=10;
|
|
server [2401:b140:1::92:205]:3003 weight=1 fail_timeout=10s max_fails=10;
|
|
server [2401:b140:1::92:206]:3003 weight=9999 fail_timeout=10s max_fails=10;
|
|
}
|
|
server {
|
|
listen 127.0.0.1:4003;
|
|
access_log /dev/null;
|
|
location / {
|
|
proxy_pass http://electrs-signet;
|
|
}
|
|
}
|
|
|
|
upstream electrs-liquidtestnet {
|
|
server [2401:b140:1::92:201]:3004 backup;
|
|
server [2401:b140:1::92:202]:3004 backup;
|
|
server [2401:b140:1::92:203]:3004 weight=1 fail_timeout=10s max_fails=10;
|
|
server [2401:b140:1::92:204]:3004 weight=1 fail_timeout=10s max_fails=10;
|
|
server [2401:b140:1::92:205]:3004 weight=1 fail_timeout=10s max_fails=10;
|
|
server [2401:b140:1::92:206]:3004 weight=9999 fail_timeout=10s max_fails=10;
|
|
}
|
|
server {
|
|
listen 127.0.0.1:4004;
|
|
access_log /dev/null;
|
|
location / {
|
|
proxy_pass http://electrs-liquidtestnet;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 127.0.0.1:80;
|
|
listen 443 ssl http2;
|
|
listen [::]:443 ssl http2;
|
|
server_name mempool.space node206.mempool.space;
|
|
|
|
include /usr/local/etc/nginx/ssl/mempool.conf;
|
|
include /usr/local/etc/nginx/nginx-mempool.conf;
|
|
access_log /var/log/nginx/mempool-access.log;
|
|
error_log /var/log/nginx/mempool-error.log;
|
|
}
|
|
|
|
server {
|
|
listen 127.0.0.1:80;
|
|
listen 443 ssl http2;
|
|
listen [::]:443 ssl http2;
|
|
server_name liquid.network;
|
|
include /usr/local/etc/nginx/ssl/mempool.conf;
|
|
include /usr/local/etc/nginx/nginx-liquid.conf;
|
|
access_log /var/log/nginx/liquid-access.log;
|
|
error_log /var/log/nginx/liquid-error.log;
|
|
}
|
|
|
|
server {
|
|
listen 127.0.0.1:80;
|
|
listen 443 ssl http2;
|
|
listen [::]:443 ssl http2;
|
|
server_name bisq.markets;
|
|
include /usr/local/etc/nginx/ssl/mempool.conf;
|
|
include /usr/local/etc/nginx/nginx-bisq.conf;
|
|
access_log /var/log/nginx/bisq-access.log;
|
|
error_log /var/log/nginx/bisq-error.log;
|
|
|
|
}
|
|
|
|
server {
|
|
listen 127.0.0.1:80;
|
|
listen 443 ssl http2;
|
|
listen [::]:443 ssl http2;
|
|
server_name mempool.ninja;
|
|
ssl_certificate /usr/local/etc/letsencrypt/live/mempool.ninja/fullchain.pem;
|
|
ssl_certificate_key /usr/local/etc/letsencrypt/live/mempool.ninja/privkey.pem;
|
|
include /usr/local/etc/letsencrypt/options-ssl-nginx.conf;
|
|
ssl_dhparam /usr/local/etc/letsencrypt/ssl-dhparams.pem;
|
|
|
|
include /usr/local/etc/nginx/nginx-mempool.conf;
|
|
}
|
|
|
|
server {
|
|
listen 127.0.0.1:80;
|
|
listen 443 ssl http2;
|
|
listen [::]:443 ssl http2;
|
|
server_name liquid.place;
|
|
ssl_certificate /usr/local/etc/letsencrypt/live/liquid.place/fullchain.pem;
|
|
ssl_certificate_key /usr/local/etc/letsencrypt/live/liquid.place/privkey.pem;
|
|
include /usr/local/etc/letsencrypt/options-ssl-nginx.conf;
|
|
ssl_dhparam /usr/local/etc/letsencrypt/ssl-dhparams.pem;
|
|
|
|
include /usr/local/etc/nginx/nginx-liquid.conf;
|
|
}
|
|
|
|
server {
|
|
listen 127.0.0.1:80;
|
|
listen 443 ssl http2;
|
|
listen [::]:443 ssl http2;
|
|
server_name bisq.ninja;
|
|
ssl_certificate /usr/local/etc/letsencrypt/live/bisq.ninja/fullchain.pem;
|
|
ssl_certificate_key /usr/local/etc/letsencrypt/live/bisq.ninja/privkey.pem;
|
|
include /usr/local/etc/letsencrypt/options-ssl-nginx.conf;
|
|
ssl_dhparam /usr/local/etc/letsencrypt/ssl-dhparams.pem;
|
|
|
|
include /usr/local/etc/nginx/nginx-bisq.conf;
|
|
}
|
|
}
|