Diferencia entre revisiones de «Apache»
Ir a la navegación
Ir a la búsqueda
([feat] Add information about Apache) |
|||
(No se muestran 6 ediciones intermedias del mismo usuario) | |||
Línea 6: | Línea 6: | ||
* Documentación oficial: [https://httpd.apache.org/docs/ EN] | * Documentación oficial: [https://httpd.apache.org/docs/ EN] | ||
= Best | = Best practices = | ||
== Compresión Gzip == | |||
Habilitar la compresión Gzip. | |||
=== GNU/Linux === | |||
==== Debian ==== | |||
Ir al virtual host: | |||
sudo nano books.proyectosbeta.net.conf | |||
Agregar: | |||
LoadModule deflate_module modules/mod_deflate.so | |||
LoadModule headers_module modules/mod_headers.so | |||
LoadModule filter_module modules/mod_filter.so | |||
<IfModule mod_deflate.c> | |||
# Activamos la compresion. | |||
SetOutputFilter DEFLATE | |||
# Indicamos los tipos de contenido a comprimir. | |||
AddOutputFilterByType DEFLATE text/plain | |||
AddOutputFilterByType DEFLATE text/html | |||
AddOutputFilterByType DEFLATE text/xml | |||
AddOutputFilterByType DEFLATE text/gml | |||
AddOutputFilterByType DEFLATE text/css | |||
AddOutputFilterByType DEFLATE application/json | |||
AddOutputFilterByType DEFLATE application/xml | |||
AddOutputFilterByType DEFLATE application/xhtml+xml | |||
AddOutputFilterByType DEFLATE application/rss+xml | |||
AddOutputFilterByType DEFLATE application/javascript | |||
AddOutputFilterByType DEFLATE application/x-javascript | |||
# Indicamos las extensiones de los ficheros a comprimir. | |||
<files *.html> | |||
SetOutputFilter DEFLATE | |||
</files> | |||
<files *.xml> | |||
SetOutputFilter DEFLATE | |||
</files> | |||
<files *.gml> | |||
SetOutputFilter DEFLATE | |||
</files> | |||
<files *.json> | |||
SetOutputFilter DEFLATE | |||
</files> | |||
<files *.js> | |||
SetOutputFilter DEFLATE | |||
</files> | |||
<files *.css> | |||
SetOutputFilter DEFLATE | |||
</files> | |||
# DeflateCompressionLevel 9 | |||
# No se comprimen para navegadores antiguos. | |||
#BrowserMatch ^Mozilla/4 gzip-only-text/html | |||
#BrowserMatch ^Mozilla/4.0[678] no-gzip | |||
#BrowserMatch \bMSIE !no-gzip !gzip-only-text/html | |||
</IfModule> | |||
Luego habilitar el modulo siguiente: | |||
sudo a2enmod headers | |||
Ahora reiniciar el server apache. | |||
sudo systemctl restart apache2 | |||
== Trace HTTP Request == | |||
Deshabilitar el trace HTTP Request. | |||
== User & Group == | |||
== Signature == | |||
Deshabilitar signature. |
Revisión actual - 10:30 28 ago 2022
General
Recursos
Best practices
Compresión Gzip
Habilitar la compresión Gzip.
GNU/Linux
Debian
Ir al virtual host:
sudo nano books.proyectosbeta.net.conf
Agregar:
LoadModule deflate_module modules/mod_deflate.so LoadModule headers_module modules/mod_headers.so LoadModule filter_module modules/mod_filter.so <IfModule mod_deflate.c> # Activamos la compresion. SetOutputFilter DEFLATE # Indicamos los tipos de contenido a comprimir. AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE text/gml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE application/json AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript # Indicamos las extensiones de los ficheros a comprimir. <files *.html> SetOutputFilter DEFLATE </files> <files *.xml> SetOutputFilter DEFLATE </files> <files *.gml> SetOutputFilter DEFLATE </files> <files *.json> SetOutputFilter DEFLATE </files> <files *.js> SetOutputFilter DEFLATE </files> <files *.css> SetOutputFilter DEFLATE </files> # DeflateCompressionLevel 9 # No se comprimen para navegadores antiguos. #BrowserMatch ^Mozilla/4 gzip-only-text/html #BrowserMatch ^Mozilla/4.0[678] no-gzip #BrowserMatch \bMSIE !no-gzip !gzip-only-text/html </IfModule>
Luego habilitar el modulo siguiente:
sudo a2enmod headers
Ahora reiniciar el server apache.
sudo systemctl restart apache2
Trace HTTP Request
Deshabilitar el trace HTTP Request.
User & Group
Signature
Deshabilitar signature.