jMÙserver {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name bsvgolf.com www.bsvgolf.com;
root /var/www/bsvgolf.com;
index index.html;
ssl_certificate /etc/letsencrypt/live/bsvgolf.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/bsvgolf.com/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
# Serve static files directly (e.g., index.html, CSS, JS)
location / {
try_files $uri $uri/ =404;
}
# Forward requests to pay-server
# Forward requests to main-server (formerly pay-server) running on port 5000
location ~ ^/\d+/\d+/(tournament-invoice|confirm-payment)$ {
proxy_pass http://localhost:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_cache_bypass $http_upgrade;
}
# Forward requests to /fetch-content or similar API endpoints to the main-server
location /fetch-content {
proxy_pass http://localhost:5000; # main-server on port 5000
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_cache_bypass $http_upgrade;
}
# Forward dynamic requests to tee-server on port 8000
location ~ ^/[^/]+/[^/]+/ {
proxy_pass https://localhost:8000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_cache_bypass $http_upgrade;
}
# Forward requests to /update to the Node.js server
location /update {
proxy_pass https://localhost:8030;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_cache_bypass $http_upgrade;
}
# Forward requests ending with /comp or sub-paths of /comp
location ~ ^/comp(/.*)?$ {
proxy_pass https://localhost:8030;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_cache_bypass $http_upgrade;
}
# Forward requests to /fetch-totals to the Node.js server
location /fetch-totals {
proxy_pass https://localhost:8030;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_cache_bypass $http_upgrade;
}
location /receive-message {
proxy_pass https://localhost:8030;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_cache_bypass $http_upgrade;
}
location /send-message {
proxy_pass https://localhost:8030;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_cache_bypass $http_upgrade;
}
# Forward requests for /msg or related sub-paths to Node.js on port 8030
location ~ ^/msg(/.*)?$ {
proxy_pass https://localhost:8030;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_cache_bypass $http_upgrade;
}
}
location ~ ^/msg(/.*)?$ {
proxy_pass https://localhost:8030;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_cache_bypass $http_upgrade;
proxy_ssl_verify off; # Add this line to disable SSL verification for loca>
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503>
}
# Proxy requests to Node.js server
location ~ ^/(fetch-totals|send-message|save-to-dir|receive-message|update|comp|clear-comp|routes|check-permissions) {
proxy_pass https://localhost:8030;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_cache_bypass $http_upgrade;
}
server {
listen 80;
listen [::]:80;
server_name bsvgolf.com www.bsvgolf.com;
return 301 https://$host$request_uri;
}
https://whatsonchain.com/tx/f21a5721c5dee2126ed74cbb1b2ebdcbd5f9155f6859f82d4fa403a6779ff397