Files
buryan-infra/ops/sprintA/sprintA-fix3.sh
T
architect c985c0617b
lint / hygiene (push) Failing after 30s
lint / hygiene (pull_request) Failing after 21s
standard / check (push) Successful in 9s
standard / check (pull_request) Successful in 14s
[INFRA] migrate active old VPS 193.233.210.184 to 45.133.209.253
2026-12-02 18:00:21 +03:00

33 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
set -e
echo "=== 1. Аудит: у всех доменов есть listen 443? ==="
ssh [email protected] 'for f in /etc/nginx/sites-enabled/*.buryans.ru; do printf "%-28s listen443: %s\n" "$(basename $f)" "$(grep -c "listen 443" $f)"; done'
echo ""
echo "=== 2. Дописываем полный 443-блок в vault ==="
ssh [email protected] 'cat >> /etc/nginx/sites-available/vault.buryans.ru << '"'"'BLK'"'"'
server {
listen 443 ssl http2;
server_name vault.buryans.ru;
ssl_certificate /etc/letsencrypt/live/vault.buryans.ru/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/vault.buryans.ru/privkey.pem;
location / {
proxy_pass http://192.168.1.109:8080;
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_set_header X-Forwarded-Host $host;
}
}
BLK
nginx -t && systemctl reload nginx && echo "nginx reloaded"'
echo ""
echo "=== 3. Проверка: чей сертификат теперь отдаёт vault ==="
curl -sv -o /dev/null https://vault.buryans.ru 2>&1 | grep -E "subject:" | head -2