Fix bug in nginx.conf.

This commit is contained in:
Derek Smith 2023-04-06 15:08:34 -04:00
parent dd33c34710
commit ec8afae4ab
Signed by: farscapian
GPG Key ID: B443E530A14E1C90
3 changed files with 5 additions and 4 deletions

View File

@ -35,6 +35,7 @@ if lxc remote get-default | grep -q "production"; then
fi fi
PRIMARY_DOMAIN=
RUN_CERT_RENEWAL=true RUN_CERT_RENEWAL=true
SKIP_WWW=false SKIP_WWW=false
RESTORE_WWW=false RESTORE_WWW=false
@ -290,7 +291,7 @@ export DOMAIN_COUNT=$(("$(echo "$DOMAIN_LIST" | tr -cd , | wc -c)"+1))
# let's provision our primary domain first. # let's provision our primary domain first.
export DOMAIN_NAME="$PRIMARY_DOMAIN" export DOMAIN_NAME="$PRIMARY_DOMAIN"
export PRIMARY_DOMAIN="$PRIMARY_DOMAIN"
export SITE_PATH="$SITES_PATH/$DOMAIN_NAME" export SITE_PATH="$SITES_PATH/$DOMAIN_NAME"
export PRIMARY_WWW_FQDN="$WWW_HOSTNAME.$DOMAIN_NAME" export PRIMARY_WWW_FQDN="$WWW_HOSTNAME.$DOMAIN_NAME"

View File

@ -53,5 +53,5 @@ done
if docker stack list --format "{{.Name}}" | grep -q reverse-proxy; then if docker stack list --format "{{.Name}}" | grep -q reverse-proxy; then
docker stack rm reverse-proxy docker stack rm reverse-proxy
sleep 5 sleep 10
fi fi

View File

@ -269,8 +269,8 @@ EOL
# Route everything to the real BTCPay server # Route everything to the real BTCPay server
location / { location / {
# URL of BTCPay Server # URL of BTCPay Server on the ss-ovn logical network
proxy_pass http://$LXD_VM_NAME.lxd:80; proxy_pass http://${BTCPAY_HOSTNAME}-${PRIMARY_DOMAIN//./-}.lxd:80;
proxy_set_header Host \$http_host; proxy_set_header Host \$http_host;
proxy_set_header X-Forwarded-Proto \$scheme; proxy_set_header X-Forwarded-Proto \$scheme;
proxy_set_header X-Real-IP \$remote_addr; proxy_set_header X-Real-IP \$remote_addr;