2020-05-09 20:56:48 +02:00
user nobody ;
pid /var/run/nginx.pid ;
2020-03-27 07:16:17 +01:00
include /usr/local/etc/nginx/modules-enabled/*.conf ;
worker_processes auto ;
worker_rlimit_nofile 9999 ;
events {
worker_connections 9000 ;
multi_accept on ;
}
http {
sendfile on ;
tcp_nopush on ;
tcp_nodelay on ;
keepalive_timeout 300s ;
types_hash_max_size 2048 ;
include /usr/local/etc/nginx/mime.types ;
default_type application/octet-stream ;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 ; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on ;
access_log /var/log/nginx/access.log ;
error_log /var/log/nginx/error.log ;
proxy_cache off ;
gzip on ;
gzip_comp_level 5 ;
gzip_min_length 256 ;
gzip_proxied any ;
gzip_vary on ;
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd .geo+json application/vnd .ms-fontobject 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 text/vnd .rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy ; # text/html is always compressed by gzip module
server {
listen 80 ;
listen [::]:80 ;
2020-05-09 20:48:16 +02:00
server_name mempool.space ;
2020-03-27 07:16:17 +01:00
2020-05-09 20:48:16 +02:00
if ( $host = mempool.space) {
2020-03-27 07:16:17 +01:00
return 301 https:// $host$request_uri ;
} # managed by Certbot
return 404 ; # managed by Certbot
}
server {
listen 80 ;
listen [::]:80 ;
2020-05-09 20:48:16 +02:00
server_name mempool.ninja ;
2020-03-27 07:16:17 +01:00
2020-05-09 20:48:16 +02:00
if ( $host = mempool.ninja) {
return 301 https://mempool.space $request_uri ;
2020-03-27 07:16:17 +01:00
} # managed by Certbot
return 404 ; # managed by Certbot
}
server {
listen [::]:443 ssl http2 ; # managed by Certbot
listen 443 ssl http2 ; # managed by Certbot
ssl_certificate /usr/local/etc/letsencrypt/live/mempool.ninja/fullchain.pem ; # managed by Certbot
ssl_certificate_key /usr/local/etc/letsencrypt/live/mempool.ninja/privkey.pem ; # managed by Certbot
include /usr/local/etc/letsencrypt/options-ssl-nginx.conf ; # managed by Certbot
ssl_dhparam /usr/local/etc/letsencrypt/ssl-dhparams.pem ; # managed by Certbot
server_name mempool.ninja ; # managed by Certbot
2020-05-09 20:48:16 +02:00
return 301 https://mempool.space $request_uri ;
2020-03-27 07:16:17 +01:00
}
server {
listen 80 ;
listen [::]:80 ;
server_name liquid.mempool.ninja ;
if ( $host = liquid.mempool.ninja) {
2020-05-09 20:48:16 +02:00
return 301 https://mempool.space/liquid $request_uri ;
2020-03-27 07:16:17 +01:00
} # managed by Certbot
return 404 ; # managed by Certbot
}
server {
listen [::]:443 ssl http2 ; # managed by Certbot
listen 443 ssl http2 ; # managed by Certbot
ssl_certificate /usr/local/etc/letsencrypt/live/liquid.mempool.ninja/fullchain.pem ; # managed by Certbot
ssl_certificate_key /usr/local/etc/letsencrypt/live/liquid.mempool.ninja/privkey.pem ; # managed by Certbot
include /usr/local/etc/letsencrypt/options-ssl-nginx.conf ; # managed by Certbot
ssl_dhparam /usr/local/etc/letsencrypt/ssl-dhparams.pem ; # managed by Certbot
server_name liquid.mempool.ninja ; # managed by Certbot
2020-05-09 20:48:16 +02:00
return 301 https://mempool.space/liquid $request_uri ;
2020-03-27 07:16:17 +01:00
}
server {
listen 80 ;
listen [::]:80 ;
server_name testnet.mempool.ninja ;
if ( $host = testnet.mempool.ninja) {
2020-05-09 20:48:16 +02:00
return 301 https://mempool.space/testnet $request_uri ;
2020-03-27 07:16:17 +01:00
} # managed by Certbot
return 404 ; # managed by Certbot
}
server {
listen [::]:443 ssl http2 ; # managed by Certbot
listen 443 ssl http2 ; # managed by Certbot
ssl_certificate /usr/local/etc/letsencrypt/live/testnet.mempool.ninja/fullchain.pem ; # managed by Certbot
ssl_certificate_key /usr/local/etc/letsencrypt/live/testnet.mempool.ninja/privkey.pem ; # managed by Certbot
include /usr/local/etc/letsencrypt/options-ssl-nginx.conf ; # managed by Certbot
ssl_dhparam /usr/local/etc/letsencrypt/ssl-dhparams.pem ; # managed by Certbot
server_name testnet.mempool.ninja ; # managed by Certbot
2020-05-09 20:48:16 +02:00
return 301 https://mempool.space/testnet $request_uri ;
2020-03-27 07:16:17 +01:00
}
2020-05-09 20:48:16 +02:00
2020-03-27 07:16:17 +01:00
server {
listen 127.0.0.1 : 81 ;
listen [::]:443 ssl default http2 ; # managed by Certbot
listen 443 ssl default http2 ; # managed by Certbot
ssl_certificate /usr/local/etc/letsencrypt/live/mempool.space/fullchain.pem ; # managed by Certbot
ssl_certificate_key /usr/local/etc/letsencrypt/live/mempool.space/privkey.pem ; # managed by Certbot
include /usr/local/etc/letsencrypt/options-ssl-nginx.conf ; # managed by Certbot
ssl_dhparam /usr/local/etc/letsencrypt/ssl-dhparams.pem ; # managed by Certbot
root /mempool/public_html/mainnet/ ;
index index.html index.htm index.nginx-debian.html ;
server_name mempool.space ; # managed by Certbot
2020-07-04 10:56:54 +02:00
add_header Strict-Transport-Security "max-age=63072000 ; includeSubDomains ; preload" ;
set $frameOptions "DENY" ;
set $contentSecurityPolicy "frame-ancestors 'none'" ;
if ( $http_referer ~ ^https://mempool.space/)
{
set $frameOptions "ALLOW-FROM https://mempool.space" ;
2020-07-04 11:00:41 +02:00
set $contentSecurityPolicy "frame-ancestors https://mempool.space" ;
2020-07-04 10:56:54 +02:00
}
if ( $http_referer ~ ^https://wiz.biz/)
{
set $frameOptions "ALLOW-FROM https://wiz.biz" ;
2020-07-04 11:00:41 +02:00
set $contentSecurityPolicy "frame-ancestors https://wiz.biz" ;
2020-07-04 10:56:54 +02:00
}
add_header X-Frame-Options $frameOptions ;
add_header Content-Security-Policy $contentSecurityPolicy ;
2020-07-05 09:33:11 +02:00
add_header Link "<https://mempool.space $request_uri> ; rel=\"canonical\"" ;
2020-07-04 10:56:54 +02:00
2020-03-27 07:16:17 +01:00
location / {
try_files $uri $uri/ /index.html = 404 ;
}
location /explorer {
rewrite /explorer/(.*) https:// $host/$1 permanent ;
}
location /webhook {
proxy_pass http://127.0.0.1:2222/ ;
}
2020-07-05 17:15:16 +02:00
location /api/v1/ws {
2020-03-27 07:16:17 +01:00
proxy_pass http://127.0.0.1:8999/ ;
proxy_http_version 1 .1 ;
proxy_set_header Upgrade $http_upgrade ;
proxy_set_header Connection "Upgrade" ;
}
2020-07-05 17:15:16 +02:00
location /api/v1 {
proxy_pass http://127.0.0.1:8999/api/v1 ;
}
location /api/ {
proxy_pass http://[::1]:3000/ ;
}
2020-03-27 07:16:17 +01:00
2020-07-05 17:15:16 +02:00
location /mainnet/api/v1/ws {
2020-03-27 07:16:17 +01:00
proxy_pass http://127.0.0.1:8999/ ;
proxy_http_version 1 .1 ;
proxy_set_header Upgrade $http_upgrade ;
proxy_set_header Connection "Upgrade" ;
}
2020-07-05 17:15:16 +02:00
location /mainnet/api/v1 {
proxy_pass http://127.0.0.1:8999/api/v1 ;
}
location /mainnet/api/ {
proxy_pass http://[::1]:3000/ ;
}
2020-03-27 07:16:17 +01:00
2020-07-05 17:15:16 +02:00
location /liquid/api/v1/ws {
2020-03-27 07:16:17 +01:00
proxy_pass http://127.0.0.1:8998/ ;
proxy_http_version 1 .1 ;
proxy_set_header Upgrade $http_upgrade ;
proxy_set_header Connection "Upgrade" ;
}
2020-07-05 17:15:16 +02:00
location /liquid/api/v1 {
proxy_pass http://127.0.0.1:8998/api/v1 ;
}
location /liquid/api/ {
proxy_pass http://[::1]:3001/ ;
}
2020-03-27 07:16:17 +01:00
2020-07-05 17:15:16 +02:00
location /testnet/api/v1/ws {
2020-03-27 07:16:17 +01:00
proxy_pass http://127.0.0.1:8997/ ;
proxy_http_version 1 .1 ;
proxy_set_header Upgrade $http_upgrade ;
proxy_set_header Connection "Upgrade" ;
}
2020-07-05 17:15:16 +02:00
location /testnet/api/v1 {
proxy_pass http://127.0.0.1:8997/api/v1 ;
}
location /testnet/api/ {
proxy_pass http://[::1]:3002/ ;
}
2020-07-18 14:07:36 +02:00
2020-07-25 17:03:30 +02:00
location /bisq/api/v1/ws {
proxy_pass http://127.0.0.1:8996/ ;
proxy_http_version 1 .1 ;
proxy_set_header Upgrade $http_upgrade ;
proxy_set_header Connection "Upgrade" ;
}
location /bisq/api/v1 {
proxy_pass http://127.0.0.1:8996/api/v1 ;
}
2020-07-18 14:07:36 +02:00
location /bisq/api {
2020-07-24 14:26:59 +02:00
proxy_pass http://127.0.0.1:8996/api/v1/bisq ;
2020-07-18 14:07:36 +02:00
}
2020-03-27 07:16:17 +01:00
}
}