Apache2
De Hack-it.org.
T2 (discuter | contributions) |
|||
Ligne 1 : | Ligne 1 : | ||
- | http:// | + | * http://ftp.traduc.org/doc-vf/gazette-linux/html/2006/123/lg123-D.html |
+ | * redirections : http://alexandre.alapetite.fr/doc-alex/redirections/index.fr.html | ||
- | + | == Apache 2== | |
+ | * Introduction | ||
+ | ** Version d'Apache 2.2 | ||
+ | * Arborescence | ||
+ | ** Configurations /etc/apache2/ | ||
+ | ** /etc/apache2/site-available/ contient les fichiers de configuration des VirtualHosts | ||
+ | ** /etc/apache2/site-enabled/ contient les virtualhosts actif. Il s'agit d'un ln -s de ../site-available/mydns.com.conf mydns.com.conf | ||
* Relancer apache après avoir touché les conf : | * Relancer apache après avoir touché les conf : | ||
- | /etc/init.d/apache2 | + | apache2ctl restart |
+ | |||
+ | * Activer un module : | ||
+ | a2enmod <anyterm> | ||
+ | |||
+ | * Désactiver un module : | ||
+ | a2dismod <anyterm> | ||
+ | |||
+ | * Documentation | ||
+ | [http://www.ac-creteil.fr/reseaux/systemes/linux/lamp/apache2-configuration.html ac-creteil] | ||
+ | |||
+ | [http://www.cgsecurity.org/Articles/apache.html cgsecurity] | ||
+ | |||
+ | ==Cacher la version== | ||
+ | * Voir ce qui est affiché actuellement : | ||
+ | curl -I localhost | ||
+ | * Trouver ou c'est configurable : | ||
+ | grep -ri token /etc/apache2/ | ||
+ | * Editer le fichier qui contient ServerTokens, commenter la ligne actuelle et foutre (ou décommenter) : | ||
+ | ServerTokens Prod | ||
+ | * Relancer Apache | ||
+ | /etc/init.d/apache2 restart | ||
+ | * [http://httpd.apache.org/docs/2.2/mod/core.html#servertokens En savoir plus] | ||
+ | |||
+ | ==Logs== | ||
+ | * [http://httpd.apache.org/docs/2.2/logs.html#conditional Virer les "Apache (internal dummy connection)"] | ||
+ | |||
+ | ==Autre== | ||
+ | * Une alternative a apache, moins gourmante : [[Nginx]] |