2026-01-06 01:46:25 -08:00
|
|
|
#!/usr/bin/env bash
|
2026-02-12 15:46:57 -08:00
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
|
|
# Load IP configuration
|
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
|
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
|
|
|
source "${PROJECT_ROOT}/config/ip-addresses.conf" 2>/dev/null || true
|
|
|
|
|
|
|
|
|
|
|
2026-01-06 01:46:25 -08:00
|
|
|
# Add blockscout.defi-oracle.io to Nginx configuration on VMID 105
|
2026-02-12 15:46:57 -08:00
|
|
|
PROXMOX_HOST="${PROXMOX_HOST_R630_02}"
|
2026-01-06 01:46:25 -08:00
|
|
|
NGINX_VMID=105
|
|
|
|
|
ssh -o ConnectTimeout=5 -o StrictHostKeyChecking=no root@${PROXMOX_HOST} "pct exec $NGINX_VMID -- bash" << 'NGINX_EOF'
|
|
|
|
|
cat >> /data/nginx/custom/http.conf << 'CONFIG_EOF'
|
|
|
|
|
|
|
|
|
|
# Blockscout (defi-oracle.io domain)
|
|
|
|
|
server {
|
|
|
|
|
listen 80;
|
|
|
|
|
server_name blockscout.defi-oracle.io;
|
|
|
|
|
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;
|
|
|
|
|
location / {
|
2026-02-12 15:46:57 -08:00
|
|
|
proxy_pass http://${IP_BLOCKSCOUT}:80;
|
2026-01-06 01:46:25 -08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
CONFIG_EOF
|
|
|
|
|
nginx -t && systemctl restart npm && echo "✓ Nginx configuration updated"
|
|
|
|
|
NGINX_EOF
|