server { server_name bch.ninja; location / { root /srv/www/bch.ninja/public; index index.php index.html; try_files $uri $uri/ /index.php$args =404; } location /configs { root /srv/www/bch.ninja/public; autoindex on; index index.html; try_files $uri $uri/ =404; } location /.well-known/bitcoin-cash-metadata-registry.json { root /srv/www/bch.ninja/public; add_header Access-Control-Allow-Origin *; } listen 443 ssl; # managed by Certbot ssl_certificate /etc/letsencrypt/live/explorer.bch.ninja/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/explorer.bch.ninja/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot } server { if ($host = bch.ninja) { return 301 https://$host$request_uri; } # managed by Certbot server_name bch.ninja; listen 80; return 404; # managed by Certbot }