napi/nginx
fenix 3fa2b7a5d7 docs: add multi-file notes and mount watchdog to README
- Document ?f= param for internal .md links in viewer.html
- Add nginx location block for per-user .md files to deploy template
- Document mount watchdog timer (auto-recovery every 12min)
- Update nginx reference copies with new .md location block
- Update repo structure and history

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 15:30:21 +01:00
..
README.md add ASIR1 (Programación) support: nginx, watchers, scripts 2026-02-25 20:32:43 +01:00
napi-ddaw2.conf docs: add multi-file notes and mount watchdog to README 2026-03-10 15:30:21 +01:00
napi2-asir1.conf docs: add multi-file notes and mount watchdog to README 2026-03-10 15:30:21 +01:00

README.md

🌐 Configuraciones Nginx — napi

Copia de referencia de los server blocks desplegados en zzz (qu3v3d0.tech).


📋 Sites activos

Fichero server_name Root Grupo
napi-ddaw2.conf notas.qu3v3d0.tech /var/www/napi DDAW2 (19 alumnos)
napi2-asir1.conf asir1.qu3v3d0.tech /var/www/napi2 ASIR1 Programación (21 alumnos)

🔑 Funcionamiento común

Ambos sites comparten la misma arquitectura:

  1. Auth PAM (libnginx-mod-http-auth-pam) — credenciales SFTP del alumno
  2. $remote_user — Nginx usa el usuario autenticado para servir su notas.md
  3. viewer.html — App estática que hace fetch('/notas.md') y renderiza con marked.js + twemoji
  4. SSL wildcard*.qu3v3d0.tech (certificado en /etc/ssl/certs/qu3v3d0.tech.crt)
Alumno → https://asir1.qu3v3d0.tech → Auth PAM → viewer.html
  → fetch('/notas.md') → Nginx alias → /var/www/napi2/data/$remote_user/notas.md
  → marked.js renderiza → alumno ve su feedback

🛠️ Gestión en zzz

# Ver configs activos
ls -la /etc/nginx/sites-enabled/

# Editar
sudo nano /etc/nginx/sites-available/napi2

# Test + reload
sudo nginx -t && sudo systemctl reload nginx

📅 DNS

DNS wildcard *.qu3v3d0.tech161.22.44.104 (zzz). No hay que tocar DNS para añadir nuevos subdominios.