feat: sitio hostingdelsur.net v2 con Astro 5, Tailwind v4, soporte light/dark, i18n es/en, Keystatic CMS, reCAPTCHA v3
- Arista Pro Alternate Regular self-hosted (font corporativa) - Toggle theme con CSS variables y @custom-variant dark - 6 servicios en 3 categorías (Hosting & Correo / Diseño & Contenido / Infraestructura) - 3 planes destacados (Básico USD 59, Institucional USD 129, E-commerce USD 219) - Datacenters en 4 países (Canadá, USA, Alemania, Uruguay) sin ciudades en el sitio - Sede operativa en Maldonado, Uruguay - i18n es/en con contenido duplicado en Keystatic - Endpoint PHP para form de contacto con PHPMailer + reCAPTCHA v3 + honeypot + rate limit - WorldMap con animación SVG de los 4 países - 29 páginas generadas, 0 JS por default - Sitemap auto + robots.txt - JSON-LD Organization + ProfessionalService con areaServed
This commit is contained in:
Executable
+48
@@ -0,0 +1,48 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
DIST="/root/opencode/development/hostingdelsur.net/dist"
|
||||
REMOTE="server1"
|
||||
REMOTE_PATH="/home/hostingd/public_html"
|
||||
LOCAL_USER="root"
|
||||
|
||||
echo "=== Deploy hostingdelsur.net ==="
|
||||
echo "Local dist: $DIST"
|
||||
echo "Remote: $REMOTE:$REMOTE_PATH"
|
||||
echo "Preserving: mwp/, .well-known/, .smtp-credentials.json (initially)"
|
||||
echo ""
|
||||
|
||||
# lftp sync: borra archivos del remote que no estén en local,
|
||||
# sube los nuevos, NO toca mwp/ ni .well-known/
|
||||
lftp -c "
|
||||
set sftp:auto-confirm yes
|
||||
set ssl:verify-certificate no
|
||||
open -u $LOCAL_USER sftp://$REMOTE
|
||||
cd $REMOTE_PATH
|
||||
|
||||
# 1. Backup de archivos críticos a tmp antes de limpiar
|
||||
mkdir -p /tmp/hds-deploy-backup
|
||||
mv .smtp-credentials.json /tmp/hds-deploy-backup/ 2>/dev/null || true
|
||||
|
||||
# 2. Limpiar lo que va a ser reemplazado
|
||||
# (NO borra mwp/ ni .well-known/)
|
||||
glob rm -rf '!(mwp|.well-known)'
|
||||
echo '=== Archivos restantes tras limpieza ==='
|
||||
ls -la
|
||||
|
||||
# 3. Subir dist
|
||||
mirror --reverse --delete --verbose=1 $DIST/ ./
|
||||
|
||||
# 4. Restaurar credenciales (se moverán después a /home/hostingd/)
|
||||
mv /tmp/hds-deploy-backup/.smtp-credentials.json ./ 2>/dev/null || true
|
||||
|
||||
echo ''
|
||||
echo '=== Resultado ==='
|
||||
ls -la
|
||||
"
|
||||
echo ""
|
||||
echo "=== Verificación mwp intacto ==="
|
||||
ssh $REMOTE "ls /home/hostingd/public_html/mwp/ | head -5" 2>&1
|
||||
echo ""
|
||||
echo "=== Files deployed ==="
|
||||
ssh $REMOTE "find /home/hostingd/public_html -maxdepth 1 -type d" 2>&1
|
||||
@@ -0,0 +1,60 @@
|
||||
# Hosting del Sur — .htaccess
|
||||
# Generado para el sitio estático Astro
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
|
||||
# HTTPS forzado
|
||||
RewriteCond %{HTTPS} off
|
||||
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
|
||||
|
||||
# www → no-www
|
||||
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
|
||||
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
|
||||
|
||||
# Quitar .html de la URL (limpieza opcional)
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_URI} ^(.+)\.html$ [NC]
|
||||
RewriteRule ^(.+)\.html$ /$1 [R=301,L]
|
||||
</IfModule>
|
||||
|
||||
# Compresión gzip
|
||||
<IfModule mod_deflate.c>
|
||||
AddOutputFilterByType DEFLATE text/html text/css text/javascript application/javascript application/json image/svg+xml application/xml font/woff2
|
||||
</IfModule>
|
||||
|
||||
# Cache-control
|
||||
<IfModule mod_expires.c>
|
||||
ExpiresActive On
|
||||
ExpiresByType image/avif "access plus 1 year"
|
||||
ExpiresByType image/webp "access plus 1 year"
|
||||
ExpiresByType image/svg+xml "access plus 1 year"
|
||||
ExpiresByType image/jpeg "access plus 1 year"
|
||||
ExpiresByType image/png "access plus 1 year"
|
||||
ExpiresByType text/css "access plus 1 year"
|
||||
ExpiresByType application/javascript "access plus 1 year"
|
||||
ExpiresByType font/woff2 "access plus 1 year"
|
||||
ExpiresByType text/html "access plus 1 hour"
|
||||
</IfModule>
|
||||
|
||||
# Security headers
|
||||
<IfModule mod_headers.c>
|
||||
Header set X-Content-Type-Options "nosniff"
|
||||
Header set X-Frame-Options "SAMEORIGIN"
|
||||
Header set Referrer-Policy "strict-origin-when-cross-origin"
|
||||
Header set Permissions-Policy "geolocation=(), microphone=(), camera=()"
|
||||
Header set Strict-Transport-Security "max-age=31536000; includeSubDomains" env=HTTPS
|
||||
</IfModule>
|
||||
|
||||
# Proteger archivos sensibles
|
||||
<FilesMatch "^\.htaccess$">
|
||||
Require all denied
|
||||
</FilesMatch>
|
||||
|
||||
<FilesMatch "\.(env|json|lock|md|yaml|yml)$">
|
||||
Require all denied
|
||||
</FilesMatch>
|
||||
|
||||
# No listado de directorios
|
||||
Options -Indexes
|
||||
Reference in New Issue
Block a user