# napi — Notas API (notas.qu3v3d0.tech) # Auth: PAM (mismas credenciales que SFTP) # Datos: /var/www/api/data/$remote_user/notas.md server { listen 80; server_name notas.qu3v3d0.tech; return 301 https://$server_name$request_uri; } server { listen 443 ssl; server_name notas.qu3v3d0.tech; ssl_certificate /etc/ssl/certs/qu3v3d0.tech.crt; ssl_certificate_key /etc/ssl/private/qu3v3d0.tech.key; root /var/www/api; auth_pam "Notas DDAW2"; auth_pam_service_name "common-auth"; location = / { try_files /viewer.html =404; } location = /notas.md { alias /var/www/api/data/$remote_user/notas.md; default_type text/plain; charset utf-8; add_header Cache-Control "no-cache"; } location ~* \.(js|css)$ { expires 7d; } location / { return 404; } }