Menú alternativo
Alternar el menú de preferencias
Menú alternativo personal
No has accedido
Tu dirección IP será visible si haces alguna edición

Diferencia entre revisiones de «Apache HTTP Server»

De TechShareRoom wiki
Sin resumen de edición
Sin resumen de edición
Línea 31: Línea 31:
</syntaxhighlight>
</syntaxhighlight>


*Activar HSTS
*Activar HSTS y más mejoras:
Abrir:
Abrir:
<syntaxhighlight lang="bash" copy>
<syntaxhighlight lang="bash" copy>
Línea 53: Línea 53:
a2enmod headers
a2enmod headers
systemctl reload apache2
systemctl reload apache2
</syntaxhighlight>
== Vulnerabilidades ==
*apache2buddy
<syntaxhighlight lang="bash" copy>
curl -O https://raw.githubusercontent.com/richardforth/apache2buddy/master/apache2buddy.pl
chmod +x apache2buddy.pl
./apache2buddy.pl
</syntaxhighlight>
*Nikto
<syntaxhighlight lang="bash" copy>
sudo apt install nikto
nikto -h https://techshareroom.com
</syntaxhighlight>
</syntaxhighlight>

Revisión del 20:21 22 feb 2026

Hardening

  • Quitar exposición de versión

Cambiar en:

/etc/apache2/conf-available/security.conf
ServerTokens Prod
ServerSignature Off
  • Securizar SSL

Cambiar en:

nano /etc/apache2/mods-available/ssl.conf
SSLCipherSuite HIGH:!aNULL:!MD5:!3DES
SSLProtocol -all +TLSv1.2 +TLSv1.3

SSLStaplingCache shmcb:${APACHE_RUN_DIR}/ssl_stapling(128000)
SSLHonorCipherOrder on

Activar módulos:

a2enmod rewrite ssl headers http2
systemctl restart apache2
  • Activar HSTS y más mejoras:

Abrir:

/etc/apache2/sites-available/tu-sitio-le-ssl.conf

Dentro del bloque:

<VirtualHost *:443>

Añade esto:

Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
Header always set X-Content-Type-Options "nosniff"
Header always set X-Frame-Options SAMEORIGIN
Header always set X-XSS-Protection "1; mode=block"

Reinicia apache

a2enmod headers
systemctl reload apache2

Vulnerabilidades

  • apache2buddy
curl -O https://raw.githubusercontent.com/richardforth/apache2buddy/master/apache2buddy.pl
chmod +x apache2buddy.pl
./apache2buddy.pl
  • Nikto
sudo apt install nikto
nikto -h https://techshareroom.com