3.1 KiB
3.1 KiB
Frontend Deployment Fix
Problem
The explorer at https://explorer.d-bis.org/ shows "Page not found" because:
- Nginx is proxying to Blockscout (port 4000) which serves its own UI
- The custom frontend (
explorer-monorepo/frontend/public/index.html) is not deployed to/var/www/html/on VMID 5000
Solution
Step 1: Update Nginx Configuration
Update nginx to serve the custom frontend from /var/www/html/ instead of proxying everything to Blockscout.
Run in VMID 5000:
# Option 1: Use the fix script
cd /home/intlc/projects/proxmox/explorer-monorepo
bash scripts/fix-nginx-serve-custom-frontend.sh
# Option 2: Run commands directly
bash scripts/fix-nginx-serve-custom-frontend.sh
This script will:
- Backup current nginx config
- Update nginx to serve custom frontend from
/var/www/html/ - Keep API proxying to Blockscout on port 4000
- Handle SSL certificates (create self-signed if Let's Encrypt not available)
- Test and restart nginx
Step 2: Deploy Custom Frontend
Deploy the custom frontend to /var/www/html/index.html:
From Proxmox host:
cd /home/intlc/projects/proxmox/explorer-monorepo
bash scripts/deploy-frontend-to-vmid5000.sh
Or manually from VMID 5000:
# If you have access to the repo in VMID 5000
cp /home/intlc/projects/proxmox/explorer-monorepo/frontend/public/index.html /var/www/html/index.html
chown www-data:www-data /var/www/html/index.html
Or using SSH from Proxmox host:
# Using existing deploy script
cd /home/intlc/projects/proxmox/explorer-monorepo
PASSWORD="L@kers2010" bash scripts/deploy.sh
Step 3: Verify
# Check if frontend file exists
ls -la /var/www/html/index.html
# Test HTTP endpoint
curl -s http://localhost/ | head -10
# Test HTTPS endpoint (if accessible)
curl -k -s https://localhost/ | head -10
# Check nginx logs
tail -f /var/log/nginx/blockscout-access.log
tail -f /var/log/nginx/blockscout-error.log
Nginx Configuration Details
The updated nginx config:
- Root path (
/): Serves custom frontend from/var/www/html/index.html - API path (
/api/): Proxies to Blockscout on port 4000 - Static assets: Served from
/var/www/html/with caching - Blockscout UI: Available at
/blockscout/if needed
Troubleshooting
Frontend still shows "Page not found"
- Check if file exists:
ls -la /var/www/html/index.html - Check file permissions:
chown www-data:www-data /var/www/html/index.html - Check nginx config:
nginx -t - Check nginx error logs:
tail -20 /var/log/nginx/blockscout-error.log
Nginx config errors
- Restore backup:
cp /etc/nginx/sites-available/blockscout.backup.* /etc/nginx/sites-available/blockscout - Test config:
nginx -t - Check syntax:
cat /etc/nginx/sites-available/blockscout
Frontend not updating
- Clear browser cache (hard refresh: Ctrl+Shift+R)
- Check if file was updated:
stat /var/www/html/index.html - Reload nginx:
systemctl reload nginx
Files Modified
/etc/nginx/sites-available/blockscout- Nginx configuration/var/www/html/index.html- Custom frontend (needs to be deployed)