I’m following this guide to set up an NGINX Reverse Proxy for Umbrel/BTCPay Server by @jorijn, but am unable to get past Step 5 (testing/reloading NGINX). Hoping someone with more experience with shell commands can help me…
I believe Steps 1-4 were successful… I received no errors when installing NGINX and Certbot or when editing the NGINX config file.
However, in Step 5 when I run:
sudo nginx -t
I get:
2025/06/04 16:53:06 [warn] 3286936#3286936: the "http2_max_field_size" directive is obsolete, use the "large_client_header_buffers" directive instead in /etc/nginx/sites-enabled/btcpay:7
2025/06/04 16:53:06 [warn] 3286936#3286936: the "http2_max_header_size" directive is obsolete, use the "large_client_header_buffers" directive instead in /etc/nginx/sites-enabled/btcpay:8
2025/06/04 16:53:06 [emerg] 3286936#3286936: invalid URL prefix in /etc/nginx/sites-enabled/btcpay:22
nginx: configuration file /etc/nginx/nginx.conf test failed
Therefore I’m also unable to reload NGINX to apply the new configuration. I only get:
nginx.service is not active, cannot reload.
For reference, my NGINX configuration file (/etc/nginx/sites-available/btcpay) contains the following (note: I’ve hidden my domain and my node’s IP address):
# Set higher buffer sizes for BTCPay Server potentially large headers/requests
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
client_header_buffer_size 500k;
large_client_header_buffers 4 500k;
http2_max_field_size 500k;
http2_max_header_size 500k;
# Required for WebSocket support (used by BTCPay)
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
# IMPORTANT: Change this to your domain
server_name btcpay.XXXXXXXX.com;
location / {
# Forward requests to the internal BTCPay Server app
proxy_pass [http://XXX.XXX.X.XXX:3003](http://XXX.XXX.X.XXX:3003);
# Set headers to pass correct information to BTCPay
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;
# WebSocket headers
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
# Listen on the internal port we forwarded earlier (for HTTP)
listen 40080;
listen [::]:40080; # Also listen on IPv6
# SSL configuration will be added here by Certbot later
}
Any help would be greatly appreciated!